locked
Change management email Notification template data RRS feed

  • Question

  • Hi, 

    I am using System Center 2012 R2 Service Manager on windows Server 2008 , I am stuck on one issue that I am unable to pull some change management form fields information in my notification template as shown in mention below snap .

    I managed to pull Review Activity ID , Change Request ID, Title , Description, Reason, Created by,Area, Priority , Impact and Risk.

    But rest of the fields including Notes, Start Date , End Date , Implementation Plan , Risk Assessment Plan , Test Plan and Backout Plan, still remains empty .

    I have also copy paste code which used to pull these fields in email template , kindly update if i do something wrong from Notes Field.

     

         Title:
         </td>
               <td class="auto-style4">&nbsp;
        $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$
       </td>
            </tr>
    <tr>
                <td class="auto-style7">&nbsp;
          Description:
         </td>
                <td class="auto-style6">&nbsp;
        $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Description$
         </td>
            </tr>
            <tr>

    <td class="auto-style5">&nbsp;
    Reason:
    <td class="auto-style4">&nbsp;

    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Reason$

    </td>
    </tr>
     <tr>

                <td class="auto-style7">&nbsp;
         Created by:
         </td>
                <td class="auto-style6">&nbsp;

     $Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemCreatedByUser' TypeConstraint='CustomSystem_Library!System.User']$?$DisplayName$?

     </td>
    </tr>
            <tr>

    <td class="auto-style5">&nbsp;
    Priority:
    <td class="auto-style4">&nbsp;
    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Priority$

    </td>
    </tr>
            <tr>

    <td class="auto-style7">&nbsp;
    Impact:
    <td class="auto-style6">&nbsp;
    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Impact$
    </td>
    </tr>
            <tr>

    <td class="auto-style5">&nbsp;
    Risk:
    <td class="auto-style4">&nbsp;
    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Risk$

    </td>
    </tr>
            <tr>

    <td class="auto-style7">&nbsp;

     Notes:
    <td class="auto-style6">&nbsp;
    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Notes$

    </td>
    </tr>
            <tr>

    <td class="auto-style5">&nbsp;
    Start Date:
    <td class="auto-style4">&nbsp;
    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/ScheduledStartDate$
    </td>
    </tr>
            <tr>
    <td class="auto-style7">&nbsp;
    End Date:
    <td class="auto-style6">&nbsp;
    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/ScheduledEndDate$
    </td>
    </tr>
            <tr>

    <td class="auto-style5">&nbsp;
    Implementation Plan:
    <td class="auto-style4">&nbsp;
    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/ImplementationPlan$


         </td>
            </tr>
           <tr>

    <td class="auto-style7">&nbsp;
    Risk Assessment Plan:
    <td class="auto-style6">&nbsp;
    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/RiskAssessmentPlan$
    </td>
    </tr>
            <tr>
    <td class="auto-style5">&nbsp;
    Test Plan:
    <td class="auto-style4">&nbsp;
    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/TestPlan$
    </td>
    </tr>
            <tr>

    <td class="auto-style7">&nbsp;
    Backout Plan:
    <td class="auto-style6">&nbsp;
    $Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/BackoutPlan$
    </td>
    </tr>
            <tr>

    Regards,

    Usama Arif



    Usama Arif

    Thursday, June 11, 2015 5:35 AM

Answers

  • the notes reference does not include a seedrole directive, and references an activity as a type constraint, meaning it will be looking at the child of the targeted request, and only pulling data if that child is an activity. i assume from other context that you are targeting the MA or RA, and looking to the Parent to get Change Request Data, meaning this reference should have "SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']" inserted as per the other working references. 

    the remainder of the entries appear correct, but i would recommend removing and re-adding those references using the property picker, as there may be some non-obvious alias problem. 

    you may be interested in my blog post on the subject of MP references, specifically covering how to read them. 

    Thursday, June 11, 2015 12:55 PM