locked
How to pass Parent Work item fields to Manual Activity notifications RRS feed

  • Question

  • Hi,

    I am trying to pass couple of fields from a Change Management request to a Review Activity and a Manual Activity.

    I have tried using the article below to no avail.

    http://blogs.technet.com/b/servicemanager/archive/2012/04/03/using-data-properties-from-the-parent-work-items-in-activity-email-templates.aspx

    I have also tried adding the  SeedRole=’Target’ after each ContainsActivity and still could not get it to work.

    My current code is as follows for the RA:

    Description: $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Description$

    Region: $Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemHasParentWorkItem' TypeConstraint='CustomChangeMgmtForm!CRClass']/Property[Type='CustomChangeMgmtForm!CRClass']/Property_41$

    Affected User:  $Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemCreatedByUser' TypeConstraint='CustomSystem_Library!System.User']/Property[Type='CustomSystem_Library!System.User']/LastName$, $Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemCreatedByUser' TypeConstraint='CustomSystem_Library!System.User']/Property[Type='CustomSystem_Library!System.User']/FirstName$

    Change Request ID:  $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$

    Change Request Title: $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Title$

    Does anyone have any ideas on how to pass these properties correctly?

    Thursday, July 9, 2015 8:26 PM

Answers

  • I'll try to follow up later, but to get you started here's a few parent properties for a child activity.

    It should be noted there is no such thing as an Affected User within a Change Request, only a Creator. So a CRs Affected User property will always return blank/null. However the Affected User exists on a Service Request...

    Parent Service Request Affected User Display Name: $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' TypeConstraint='CustomSystem_Library!System.Domain.User']/Property[Type='CustomSystem_Library!System.Domain.User']/DisplayName$

    Parent Service Request Affected User First Name: $Context/Path[Relationship='CoreActivity!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='WorkItem!System.WorkItem']/Path[Relationship='WorkItem!System.WorkItemAffectedUser' TypeConstraint='System!System.User']/Property[Type='System!System.User']/First Name$

    Parent Service Request Affected User Last Name: $Context/Path[Relationship='CoreActivity!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='WorkItem!System.WorkItem']/Path[Relationship='WorkItem!System.WorkItemAffectedUser' TypeConstraint='System!System.User']/Property[Type='System!System.User']/LastName$

    Parent Work Item Title (SR or CR): $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Title$

    Thursday, July 9, 2015 10:25 PM