How to fill up the OwnerTeam and Owner fields with the values of the parent object in a task

Version 1

    Details

    This article shows how to fill up the OwnerTeam and Owner fields of a task with the values of the parent object, but it could be valid to any other object, modifying the expression used in the rules based on the relationships where the ParentLink field is used.

    This article is created based on the rules of HEAT Service Management 2014.3.1.1, so depending on the existent relationships the expression could vary.


    Resolution

    Prior to get the values from the parent object, probably we need to correct two relationships:

    1.- In the Task object, review the relationship "CIServiceAssocTask" and ensure that is is configured as in the screenshot:



    2.- In the Task#Assignment object, review the relationship "CIServiceAssocTaskAssignment" and ensure that is is configured as in the screenshot



    In the Task#Asssignment object, add two new "Editing Rule", one for the OwnerTeam and one for the Owner, that will cover the relationships by default in HEAT 2014.3.1.1. Please find the expressions below for a friendly copy & paste.

    OwnerTeam

    $(if ParentLink_Category == "Change" then [Change#.]OwnerTeam
    else if ParentLink_Category == "FRS_Knowledge.ErrorMessage" then [FRS_Knowledge#ErrorMessage.]OwnerTeam
    else if ParentLink_Category == "FRS_Knowledge.IssueResolution" then [FRS_Knowledge#IssueResolution.]OwnerTeam
    else if ParentLink_Category == "FRS_Knowledge.QandA" then [FRS_Knowledge#QandA.]OwnerTeam
    else if ParentLink_Category == "FRS_Knowledge.Document" then [FRS_Knowledge#Document.]OwnerTeam
    else if ParentLink_Category == "FRS_Knowledge.ErrorMessage" then [FRS_Knowledge#ErrorMessage.]OwnerTeam
    else if ParentLink_Category == "FRS_Knowledge.Patch" then [FRS_Knowledge#Patch.]OwnerTeam
    else if ParentLink_Category == "FRS_Knowledge.Reference" then [FRS_Knowledge#Reference.]OwnerTeam
    else if ParentLink_Category == "Incident" then [Incident#.Rev3]OwnerTeam
    else if ParentLink_Category == "ReleaseMilestone" then [ReleaseMilestone#.]OwnerTeam
    else if ParentLink_Category == "ServiceReq" then [ServiceReq#.]OwnerTeam
    else "")




    Owner

    $(if ParentLink_Category == "Change" then [Change#.]Owner
    else if ParentLink_Category == "FRS_Knowledge.ErrorMessage" then [FRS_Knowledge#ErrorMessage.]Owner
    else if ParentLink_Category == "FRS_Knowledge.IssueResolution" then [FRS_Knowledge#IssueResolution.]Owner
    else if ParentLink_Category == "FRS_Knowledge.QandA" then [FRS_Knowledge#QandA.]Owner
    else if ParentLink_Category == "FRS_Knowledge.Document" then [FRS_Knowledge#Document.]Owner
    else if ParentLink_Category == "FRS_Knowledge.ErrorMessage" then [FRS_Knowledge#ErrorMessage.]Owner
    else if ParentLink_Category == "FRS_Knowledge.Patch" then [FRS_Knowledge#Patch.]Owner
    else if ParentLink_Category == "FRS_Knowledge.Reference" then [FRS_Knowledge#Reference.]Owner
    else if ParentLink_Category == "Incident" then [Incident#.Rev3]Owner
    else if ParentLink_Category == "ReleaseMilestone" then [ReleaseMilestone#.]Owner
    else if ParentLink_Category == "ServiceReq" then [ServiceReq#.]Owner
    else "")



    Optionally, we can remove the Constraint on the Pick List that provides the Team List, as if it is not similar to the Parent object we could have wrong values: