locked
Setting up email notification for change request when scheduled end date is updated RRS feed

  • Question

  • Hello,

    I'm looking for setting up an email subscription to notify when the scheduled end date of a change request is changed to a new value. I can't manage to find a way to setup the criteria for this and would appreciate if anyone has a solution for this?

    Friday, June 12, 2015 7:51 AM

Answers

  • You can create a subscription in the console just using some generic criteria. Then export the Management Pack and modify the XML to something similar to the example below. This criteria is when the Pre value does not match the Post value or the Pre value is null is change to any value that is not null. 

    <Criteria>
      <Expression>
        <And>
          <Expression>
            <Or>
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <Property State="Pre">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/ScheduledEndDate$</Property>
                  </ValueExpression>
                  <Operator>NotEqual</Operator>
                  <ValueExpression>
                    <Property State="Post">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/ScheduledEndDate$</Property>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
              <Expression>
                <UnaryExpression>
                  <ValueExpression>
                    <Property State="Pre">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/ScheduledEndDate$</Property>
                  </ValueExpression>
                  <Operator>IsNull</Operator>
                </UnaryExpression>
              </Expression>
            </Or>
          </Expression>
          <Expression>
            <UnaryExpression>
              <ValueExpression>
                <Property State="Post">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/ScheduledEndDate$</Property>
              </ValueExpression>
              <Operator>IsNotNull</Operator>
            </UnaryExpression>
          </Expression>
        </And>
      </Expression>
    </Criteria>
    Keep in mind that your management pack aliases may be different from what I have here so you may need to update them. 


    Matthew Dowst | Blog | Twitter

    Friday, June 12, 2015 6:40 PM

All replies

  • You can create a subscription in the console just using some generic criteria. Then export the Management Pack and modify the XML to something similar to the example below. This criteria is when the Pre value does not match the Post value or the Pre value is null is change to any value that is not null. 

    <Criteria>
      <Expression>
        <And>
          <Expression>
            <Or>
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <Property State="Pre">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/ScheduledEndDate$</Property>
                  </ValueExpression>
                  <Operator>NotEqual</Operator>
                  <ValueExpression>
                    <Property State="Post">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/ScheduledEndDate$</Property>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
              <Expression>
                <UnaryExpression>
                  <ValueExpression>
                    <Property State="Pre">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/ScheduledEndDate$</Property>
                  </ValueExpression>
                  <Operator>IsNull</Operator>
                </UnaryExpression>
              </Expression>
            </Or>
          </Expression>
          <Expression>
            <UnaryExpression>
              <ValueExpression>
                <Property State="Post">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/ScheduledEndDate$</Property>
              </ValueExpression>
              <Operator>IsNotNull</Operator>
            </UnaryExpression>
          </Expression>
        </And>
      </Expression>
    </Criteria>
    Keep in mind that your management pack aliases may be different from what I have here so you may need to update them. 


    Matthew Dowst | Blog | Twitter

    Friday, June 12, 2015 6:40 PM
  • Thank you for that Matthew. I will test this later this week.

    Tuesday, June 16, 2015 8:47 AM