Change Management Assigned to Me Views

Hello All,

SCSM has two out of box views for Change Management that I would like to utilize. The views are "Change Requests: In Review"and "Change Requests: Manual Activity In Progress"

Ideally I would like to make new views that utilize that same functionality but show what's assigned to me(me being the viewer/user).

For "Change Request: In Review" I would like for a view that showed the user Change Requests with a Review Activity In Progress waiting to be approved/completed.

For "Change Requests: Manual Activity In Progress" I would like a view that showed the user Change Requests with a Manual Activity In Progress waiting to be completed.

I am using the Cireson View Builder and know that I will need to use XML editor in order to complete this.

So far the code I have is:

<QueryCriteria Adapter="omsdk://Adapters/Criteria" xmlns="http://tempuri.org/Criteria.xsd">
  <Criteria>
    <FreeformCriteria>
      <Freeform>
        <Criteria xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
          <Expression>
            <In>
                <GenericProperty Path="$Context/Path[Relationship='WorkItem!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>
                    <Values>
                        <Token>[me]</Token>
                        <Token>[mygroups]</Token>
                    </Values>
            </In>
          </Expression>
        </Criteria>
        <Criteria xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
          <Expression>
            <And>
              <Expression>
                <SimpleExpression>
                  <ValueExpressionLeft>
                    <Property>$Context/Path[Relationship='CoreActivity!System.WorkItemContainsActivity' TypeConstraint='CoreActivity!System.WorkItem.Activity.ReviewActivity']/Property[Type='CoreActivity!System.WorkItem.Activity']/Status$</Property>
                  </ValueExpressionLeft>
                  <Operator>Equal</Operator>
                  <ValueExpressionRight>
                    <Value>{11fc3cef-15e5-bca4-dee0-9c1155ec8d83}</Value>
                  </ValueExpressionRight>
                </SimpleExpression>
              </Expression>
              <Expression>
                <SimpleExpression>
                  <ValueExpressionLeft>
                    <Property>$Context/Property[Type='CoreChange!System.WorkItem.ChangeRequest']/Status$</Property>
                  </ValueExpressionLeft>
                  <Operator>Equal</Operator>
                  <ValueExpressionRight>
                    <Value>{6d6c64dd-07ac-aaf5-f812-6a7cceb5154d}</Value>
                  </ValueExpressionRight>
                </SimpleExpression>
              </Expression>
            </And>
          </Expression>
        </Criteria>
      </Freeform>
    </FreeformCriteria>
  </Criteria>
</QueryCriteria>

I can not get the View to show what I am looking for. Does anyone have any idea on how to do this?

August 25th, 2015 4:45pm

You got it almost. 

You have two seperate criterias, one for [me] / [mygroups] and then one looking at the status. So it will only take the first criteria and process that. I have here wrapped it all inside one criteria and then separated it into two expressions:
(All change requests assigned to Me / my group) AND (all change requests with status = in progress and review activity status = in progress.)

But be aware that this will only work for 1 hop in relationships, if you have review activities inside parallel activities it will not work.

     <Criteria>
            <QueryCriteria Adapter="omsdk://Adapters/Criteria" xmlns="http://tempuri.org/Criteria.xsd">
              <Criteria>
    <FreeformCriteria>
      <Freeform>
        <Criteria xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
          <Expression>
		  <And>		 
		  <Expression>
            <In>
                <GenericProperty Path="$Context/Path[Relationship='WorkItem2!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>
                    <Values>
                        <Token>[me]</Token>
                        <Token>[mygroups]</Token>
                    </Values>
            </In>         
          </Expression>
		  <Expression>
            <And>
              <Expression>
                <SimpleExpression>
                  <ValueExpressionLeft>
                    <Property>$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
                  </ValueExpressionLeft>
                  <Operator>Equal</Operator>
                  <ValueExpressionRight>
                    <Value>{11fc3cef-15e5-bca4-dee0-9c1155ec8d83}</Value>
                  </ValueExpressionRight>
                </SimpleExpression>
              </Expression>
              <Expression>
                <SimpleExpression>
                  <ValueExpressionLeft>
                    <Property>$Context/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Status$</Property>
                  </ValueExpressionLeft>
                  <Operator>Equal</Operator>
                  <ValueExpressionRight>
                    <Value>{6d6c64dd-07ac-aaf5-f812-6a7cceb5154d}</Value>
                  </ValueExpressionRight>
                </SimpleExpression>
              </Expression>
            </And>
          </Expression>
		  </And>
		  </Expression>
        </Criteria>
      </Freeform>
    </FreeformCriteria>
  </Criteria>
            </QueryCriteria>
          </Criteria>
     

 
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 8:51am

Thanks Morten!

When I did <Criteria> at the beginning to </Criteria> very end it did not like the format and gave me an error that said:

System.InvalidOperationException: There is an error in XML document (1,2).---> System.InvalidOperationException: <Freeform xmlns='http://tempuri.org/Criteria.xsd'> was not expected.

I changed the code so that it read <QueryCriteria Adapater="....."> in the beginning to </QueryCriteria> on the end as shown in the code below:

<QueryCriteria Adapter="omsdk://Adapters/Criteria"
    xmlns="http://tempuri.org/Criteria.xsd">
    <Criteria>
        <FreeformCriteria>
            <Freeform>
                <Criteria
                    xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
                    <Expression>
                        <And>
                            <Expression>
                                <In>
                                    <GenericProperty Path="$Context/Path[Relationship='WorkItem2!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>
                                    <Values>
                                        <Token>[me]</Token>
                                        <Token>[mygroups]</Token>
                                    </Values>
                                </In>
                            </Expression>
                            <Expression>
                                <And>
                                    <Expression>
                                        <SimpleExpression>
                                            <ValueExpressionLeft>
                                                <Property>$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
                                            </ValueExpressionLeft>
                                            <Operator>Equal</Operator>
                                            <ValueExpressionRight>
                                                <Value>{11fc3cef-15e5-bca4-dee0-9c1155ec8d83}</Value>
                                            </ValueExpressionRight>
                                        </SimpleExpression>
                                    </Expression>
                                    <Expression>
                                        <SimpleExpression>
                                            <ValueExpressionLeft>
                                                <Property>$Context/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Status$</Property>
                                            </ValueExpressionLeft>
                                            <Operator>Equal</Operator>
                                            <ValueExpressionRight>
                                                <Value>{6d6c64dd-07ac-aaf5-f812-6a7cceb5154d}</Value>
                                            </ValueExpressionRight>
                                        </SimpleExpression>
                                    </Expression>
                                </And>
                            </Expression>
                        </And>
                    </Expression>
                </Criteria>
            </Freeform>
        </FreeformCriteria>
    </Criteria>
</QueryCriteria>

I now get the error below: Any ideas?


  • Edited by ETechnetG 17 hours 52 minutes ago
August 26th, 2015 9:31am

Yes, I tested it in one my existing test management pack where the alias names for the references was different from yours, so I had to modify those a little. 

So take my code above, replace it inside your own view (or make a new for the purpose) and then change each alias back to yours: WorkItem2 = WorkItem, CustomSystem_WorkItem_ChangeRequest_Library = CoreChange and CustomSystem_WorkItem_Activity_Library = CoreActivity

(think it was only those 3)


Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 10:04am

You got it almost. 

You have two seperate criterias, one for [me] / [mygroups] and then one looking at the status. So it will only take the first criteria and process that. I have here wrapped it all inside one criteria and then separated it into two expressions:
(All change requests assigned to Me / my group) AND (all change requests with status = in progress and review activity status = in progress.)

But be aware that this will only work for 1 hop in relationships, if you have review activities inside parallel activities it will not work.

     <Criteria>
            <QueryCriteria Adapter="omsdk://Adapters/Criteria" xmlns="http://tempuri.org/Criteria.xsd">
              <Criteria>
    <FreeformCriteria>
      <Freeform>
        <Criteria xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
          <Expression>
		  <And>		 
		  <Expression>
            <In>
                <GenericProperty Path="$Context/Path[Relationship='WorkItem2!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>
                    <Values>
                        <Token>[me]</Token>
                        <Token>[mygroups]</Token>
                    </Values>
            </In>         
          </Expression>
		  <Expression>
            <And>
              <Expression>
                <SimpleExpression>
                  <ValueExpressionLeft>
                    <Property>$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
                  </ValueExpressionLeft>
                  <Operator>Equal</Operator>
                  <ValueExpressionRight>
                    <Value>{11fc3cef-15e5-bca4-dee0-9c1155ec8d83}</Value>
                  </ValueExpressionRight>
                </SimpleExpression>
              </Expression>
              <Expression>
                <SimpleExpression>
                  <ValueExpressionLeft>
                    <Property>$Context/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Status$</Property>
                  </ValueExpressionLeft>
                  <Operator>Equal</Operator>
                  <ValueExpressionRight>
                    <Value>{6d6c64dd-07ac-aaf5-f812-6a7cceb5154d}</Value>
                  </ValueExpressionRight>
                </SimpleExpression>
              </Expression>
            </And>
          </Expression>
		  </And>
		  </Expression>
        </Criteria>
      </Freeform>
    </FreeformCriteria>
  </Criteria>
            </QueryCriteria>
          </Criteria>
     

 
August 26th, 2015 12:39pm

You got it almost. 

You have two seperate criterias, one for [me] / [mygroups] and then one looking at the status. So it will only take the first criteria and process that. I have here wrapped it all inside one criteria and then separated it into two expressions:
(All change requests assigned to Me / my group) AND (all change requests with status = in progress and review activity status = in progress.)

But be aware that this will only work for 1 hop in relationships, if you have review activities inside parallel activities it will not work.

     <Criteria>
            <QueryCriteria Adapter="omsdk://Adapters/Criteria" xmlns="http://tempuri.org/Criteria.xsd">
              <Criteria>
    <FreeformCriteria>
      <Freeform>
        <Criteria xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
          <Expression>
		  <And>		 
		  <Expression>
            <In>
                <GenericProperty Path="$Context/Path[Relationship='WorkItem2!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>
                    <Values>
                        <Token>[me]</Token>
                        <Token>[mygroups]</Token>
                    </Values>
            </In>         
          </Expression>
		  <Expression>
            <And>
              <Expression>
                <SimpleExpression>
                  <ValueExpressionLeft>
                    <Property>$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
                  </ValueExpressionLeft>
                  <Operator>Equal</Operator>
                  <ValueExpressionRight>
                    <Value>{11fc3cef-15e5-bca4-dee0-9c1155ec8d83}</Value>
                  </ValueExpressionRight>
                </SimpleExpression>
              </Expression>
              <Expression>
                <SimpleExpression>
                  <ValueExpressionLeft>
                    <Property>$Context/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Status$</Property>
                  </ValueExpressionLeft>
                  <Operator>Equal</Operator>
                  <ValueExpressionRight>
                    <Value>{6d6c64dd-07ac-aaf5-f812-6a7cceb5154d}</Value>
                  </ValueExpressionRight>
                </SimpleExpression>
              </Expression>
            </And>
          </Expression>
		  </And>
		  </Expression>
        </Criteria>
      </Freeform>
    </FreeformCriteria>
  </Criteria>
            </QueryCriteria>
          </Criteria>
     

 
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 12:39pm

You got it almost. 

You have two seperate criterias, one for [me] / [mygroups] and then one looking at the status. So it will only take the first criteria and process that. I have here wrapped it all inside one criteria and then separated it into two expressions:
(All change requests assigned to Me / my group) AND (all change requests with status = in progress and review activity status = in progress.)

But be aware that this will only work for 1 hop in relationships, if you have review activities inside parallel activities it will not work.

     <Criteria>
            <QueryCriteria Adapter="omsdk://Adapters/Criteria" xmlns="http://tempuri.org/Criteria.xsd">
              <Criteria>
    <FreeformCriteria>
      <Freeform>
        <Criteria xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
          <Expression>
		  <And>		 
		  <Expression>
            <In>
                <GenericProperty Path="$Context/Path[Relationship='WorkItem2!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>
                    <Values>
                        <Token>[me]</Token>
                        <Token>[mygroups]</Token>
                    </Values>
            </In>         
          </Expression>
		  <Expression>
            <And>
              <Expression>
                <SimpleExpression>
                  <ValueExpressionLeft>
                    <Property>$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
                  </ValueExpressionLeft>
                  <Operator>Equal</Operator>
                  <ValueExpressionRight>
                    <Value>{11fc3cef-15e5-bca4-dee0-9c1155ec8d83}</Value>
                  </ValueExpressionRight>
                </SimpleExpression>
              </Expression>
              <Expression>
                <SimpleExpression>
                  <ValueExpressionLeft>
                    <Property>$Context/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Status$</Property>
                  </ValueExpressionLeft>
                  <Operator>Equal</Operator>
                  <ValueExpressionRight>
                    <Value>{6d6c64dd-07ac-aaf5-f812-6a7cceb5154d}</Value>
                  </ValueExpressionRight>
                </SimpleExpression>
              </Expression>
            </And>
          </Expression>
		  </And>
		  </Expression>
        </Criteria>
      </Freeform>
    </FreeformCriteria>
  </Criteria>
            </QueryCriteria>
          </Criteria>
     

 
August 26th, 2015 12:39pm

Thanks Morten!

When I did <Criteria> at the beginning to </Criteria> very end it did not like the format and gave me an error that said:

System.InvalidOperationException: There is an error in XML document (1,2).---> System.InvalidOperationException: <Freeform xmlns='http://tempuri.org/Criteria.xsd'> was not expected.

I changed the code so that it read <QueryCriteria Adapater="....."> in the beginning to </QueryCriteria> on the end as shown in the code below:

<QueryCriteria Adapter="omsdk://Adapters/Criteria"
    xmlns="http://tempuri.org/Criteria.xsd">
    <Criteria>
        <FreeformCriteria>
            <Freeform>
                <Criteria
                    xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
                    <Expression>
                        <And>
                            <Expression>
                                <In>
                                    <GenericProperty Path="$Context/Path[Relationship='WorkItem2!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>
                                    <Values>
                                        <Token>[me]</Token>
                                        <Token>[mygroups]</Token>
                                    </Values>
                                </In>
                            </Expression>
                            <Expression>
                                <And>
                                    <Expression>
                                        <SimpleExpression>
                                            <ValueExpressionLeft>
                                                <Property>$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
                                            </ValueExpressionLeft>
                                            <Operator>Equal</Operator>
                                            <ValueExpressionRight>
                                                <Value>{11fc3cef-15e5-bca4-dee0-9c1155ec8d83}</Value>
                                            </ValueExpressionRight>
                                        </SimpleExpression>
                                    </Expression>
                                    <Expression>
                                        <SimpleExpression>
                                            <ValueExpressionLeft>
                                                <Property>$Context/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Status$</Property>
                                            </ValueExpressionLeft>
                                            <Operator>Equal</Operator>
                                            <ValueExpressionRight>
                                                <Value>{6d6c64dd-07ac-aaf5-f812-6a7cceb5154d}</Value>
                                            </ValueExpressionRight>
                                        </SimpleExpression>
                                    </Expression>
                                </And>
                            </Expression>
                        </And>
                    </Expression>
                </Criteria>
            </Freeform>
        </FreeformCriteria>
    </Criteria>
</QueryCriteria>

I now get the error below: Any ideas?


  • Edited by ETechnetG Wednesday, August 26, 2015 1:20 PM
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 1:19pm

Thanks Morten!

When I did <Criteria> at the beginning to </Criteria> very end it did not like the format and gave me an error that said:

System.InvalidOperationException: There is an error in XML document (1,2).---> System.InvalidOperationException: <Freeform xmlns='http://tempuri.org/Criteria.xsd'> was not expected.

I changed the code so that it read <QueryCriteria Adapater="....."> in the beginning to </QueryCriteria> on the end as shown in the code below:

<QueryCriteria Adapter="omsdk://Adapters/Criteria"
    xmlns="http://tempuri.org/Criteria.xsd">
    <Criteria>
        <FreeformCriteria>
            <Freeform>
                <Criteria
                    xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
                    <Expression>
                        <And>
                            <Expression>
                                <In>
                                    <GenericProperty Path="$Context/Path[Relationship='WorkItem2!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>
                                    <Values>
                                        <Token>[me]</Token>
                                        <Token>[mygroups]</Token>
                                    </Values>
                                </In>
                            </Expression>
                            <Expression>
                                <And>
                                    <Expression>
                                        <SimpleExpression>
                                            <ValueExpressionLeft>
                                                <Property>$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
                                            </ValueExpressionLeft>
                                            <Operator>Equal</Operator>
                                            <ValueExpressionRight>
                                                <Value>{11fc3cef-15e5-bca4-dee0-9c1155ec8d83}</Value>
                                            </ValueExpressionRight>
                                        </SimpleExpression>
                                    </Expression>
                                    <Expression>
                                        <SimpleExpression>
                                            <ValueExpressionLeft>
                                                <Property>$Context/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Status$</Property>
                                            </ValueExpressionLeft>
                                            <Operator>Equal</Operator>
                                            <ValueExpressionRight>
                                                <Value>{6d6c64dd-07ac-aaf5-f812-6a7cceb5154d}</Value>
                                            </ValueExpressionRight>
                                        </SimpleExpression>
                                    </Expression>
                                </And>
                            </Expression>
                        </And>
                    </Expression>
                </Criteria>
            </Freeform>
        </FreeformCriteria>
    </Criteria>
</QueryCriteria>

I now get the error below: Any ideas?


  • Edited by ETechnetG Wednesday, August 26, 2015 1:20 PM
August 26th, 2015 1:19pm

Thanks Morten!

When I did <Criteria> at the beginning to </Criteria> very end it did not like the format and gave me an error that said:

System.InvalidOperationException: There is an error in XML document (1,2).---> System.InvalidOperationException: <Freeform xmlns='http://tempuri.org/Criteria.xsd'> was not expected.

I changed the code so that it read <QueryCriteria Adapater="....."> in the beginning to </QueryCriteria> on the end as shown in the code below:

<QueryCriteria Adapter="omsdk://Adapters/Criteria"
    xmlns="http://tempuri.org/Criteria.xsd">
    <Criteria>
        <FreeformCriteria>
            <Freeform>
                <Criteria
                    xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
                    <Expression>
                        <And>
                            <Expression>
                                <In>
                                    <GenericProperty Path="$Context/Path[Relationship='WorkItem2!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>
                                    <Values>
                                        <Token>[me]</Token>
                                        <Token>[mygroups]</Token>
                                    </Values>
                                </In>
                            </Expression>
                            <Expression>
                                <And>
                                    <Expression>
                                        <SimpleExpression>
                                            <ValueExpressionLeft>
                                                <Property>$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
                                            </ValueExpressionLeft>
                                            <Operator>Equal</Operator>
                                            <ValueExpressionRight>
                                                <Value>{11fc3cef-15e5-bca4-dee0-9c1155ec8d83}</Value>
                                            </ValueExpressionRight>
                                        </SimpleExpression>
                                    </Expression>
                                    <Expression>
                                        <SimpleExpression>
                                            <ValueExpressionLeft>
                                                <Property>$Context/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Status$</Property>
                                            </ValueExpressionLeft>
                                            <Operator>Equal</Operator>
                                            <ValueExpressionRight>
                                                <Value>{6d6c64dd-07ac-aaf5-f812-6a7cceb5154d}</Value>
                                            </ValueExpressionRight>
                                        </SimpleExpression>
                                    </Expression>
                                </And>
                            </Expression>
                        </And>
                    </Expression>
                </Criteria>
            </Freeform>
        </FreeformCriteria>
    </Criteria>
</QueryCriteria>

I now get the error below: Any ideas?


  • Edited by ETechnetG Wednesday, August 26, 2015 1:20 PM
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 1:19pm

Thanks Morten!

When I did <Criteria> at the beginning to </Criteria> very end it did not like the format and gave me an error that said:

System.InvalidOperationException: There is an error in XML document (1,2).---> System.InvalidOperationException: <Freeform xmlns='http://tempuri.org/Criteria.xsd'> was not expected.

I changed the code so that it read <QueryCriteria Adapater="....."> in the beginning to </QueryCriteria> on the end as shown in the code below:

<QueryCriteria Adapter="omsdk://Adapters/Criteria"
    xmlns="http://tempuri.org/Criteria.xsd">
    <Criteria>
        <FreeformCriteria>
            <Freeform>
                <Criteria
                    xmlns="http://Microsoft.EnterpriseManagement.Core.Criteria/">
                    <Expression>
                        <And>
                            <Expression>
                                <In>
                                    <GenericProperty Path="$Context/Path[Relationship='WorkItem2!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>
                                    <Values>
                                        <Token>[me]</Token>
                                        <Token>[mygroups]</Token>
                                    </Values>
                                </In>
                            </Expression>
                            <Expression>
                                <And>
                                    <Expression>
                                        <SimpleExpression>
                                            <ValueExpressionLeft>
                                                <Property>$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$</Property>
                                            </ValueExpressionLeft>
                                            <Operator>Equal</Operator>
                                            <ValueExpressionRight>
                                                <Value>{11fc3cef-15e5-bca4-dee0-9c1155ec8d83}</Value>
                                            </ValueExpressionRight>
                                        </SimpleExpression>
                                    </Expression>
                                    <Expression>
                                        <SimpleExpression>
                                            <ValueExpressionLeft>
                                                <Property>$Context/Property[Type='CustomSystem_WorkItem_ChangeRequest_Library!System.WorkItem.ChangeRequest']/Status$</Property>
                                            </ValueExpressionLeft>
                                            <Operator>Equal</Operator>
                                            <ValueExpressionRight>
                                                <Value>{6d6c64dd-07ac-aaf5-f812-6a7cceb5154d}</Value>
                                            </ValueExpressionRight>
                                        </SimpleExpression>
                                    </Expression>
                                </And>
                            </Expression>
                        </And>
                    </Expression>
                </Criteria>
            </Freeform>
        </FreeformCriteria>
    </Criteria>
</QueryCriteria>

I now get the error below: Any ideas?


  • Edited by ETechnetG Wednesday, August 26, 2015 1:20 PM
August 26th, 2015 1:19pm

Yes, I tested it in one my existing test management pack where the alias names for the references was different from yours, so I had to modify those a little. 

So take my code above, replace it inside your own view (or make a new for the purpose) and then change each alias back to yours: WorkItem2 = WorkItem, CustomSystem_WorkItem_ChangeRequest_Library = CoreChange and CustomSystem_WorkItem_Activity_Library = CoreActivity

(think it was only those 3)


Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 1:52pm

Yes, I tested it in one my existing test management pack where the alias names for the references was different from yours, so I had to modify those a little. 

So take my code above, replace it inside your own view (or make a new for the purpose) and then change each alias back to yours: WorkItem2 = WorkItem, CustomSystem_WorkItem_ChangeRequest_Library = CoreChange and CustomSystem_WorkItem_Activity_Library = CoreActivity

(think it was only those 3)


August 26th, 2015 1:52pm

Yes, I tested it in one my existing test management pack where the alias names for the references was different from yours, so I had to modify those a little. 

So take my code above, replace it inside your own view (or make a new for the purpose) and then change each alias back to yours: WorkItem2 = WorkItem, CustomSystem_WorkItem_ChangeRequest_Library = CoreChange and CustomSystem_WorkItem_Activity_Library = CoreActivity

(think it was only those 3)


Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 1:52pm

Yes, I tested it in one my existing test management pack where the alias names for the references was different from yours, so I had to modify those a little. 

So take my code above, replace it inside your own view (or make a new for the purpose) and then change each alias back to yours: WorkItem2 = WorkItem, CustomSystem_WorkItem_ChangeRequest_Library = CoreChange and CustomSystem_WorkItem_Activity_Library = CoreActivity

(think it was only those 3)


August 26th, 2015 1:52pm

Ok thanks! I got it to work. The only issue I have now is that it's only showing me the Change Requests that are assigned to me. If possible I would like to know In Progress Change Requests that have In Progress Review Activities where I am the reviewer.
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 3:23pm

Ok thanks! I got it to work. The only issue I have now is that it's only showing me the Change Requests that are assigned to me. If possible I would like to know In Progress Change Requests that have In Progress Review Activities where I am the reviewer.
  • Edited by ETechnetG Wednesday, August 26, 2015 7:12 PM
August 26th, 2015 7:11pm

Ok thanks! I got it to work. The only issue I have now is that it's only showing me the Change Requests that are assigned to me. If possible I would like to know In Progress Change Requests that have In Progress Review Activities where I am the reviewer.
  • Edited by ETechnetG Wednesday, August 26, 2015 7:12 PM
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 7:11pm

Ok thanks! I got it to work. The only issue I have now is that it's only showing me the Change Requests that are assigned to me. If possible I would like to know In Progress Change Requests that have In Progress Review Activities where I am the reviewer.
  • Edited by ETechnetG Wednesday, August 26, 2015 7:12 PM
August 26th, 2015 7:11pm

Ok thanks! I got it to work. The only issue I have now is that it's only showing me the Change Requests that are assigned to me. If possible I would like to know In Progress Change Requests that have In Progress Review Activities where I am the reviewer.
  • Edited by ETechnetG Wednesday, August 26, 2015 7:12 PM
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 7:11pm

Yes that is what your original request was about - all change requests with assigned to = me where status is in progress and review activity status is in progress.  It works fine on mine.

Getting "I am reviewer" can probably be added as well to your view. You can take a look at this post for help: https://social.technet.microsoft.com/Forums/systemcenter/en-US/a0e9feb9-6ec0-4e12-9c19-4b8214250189/scsm-2012-activities-assigned-to-me-review-activities

Though I am more a fan of looking at the Activity views in that case. Who will use those views? If your analysts want to know what they should review, they would probably like to look at the review activities themselves instead of first going to change requests and then scouting for their review activity inside. And what about reviewers who doesn't have the console?

But you say you have the Cireson view builder - do you also have the Cireson My Active Work Items ? Then that's probably the view to go for over all.

August 27th, 2015 1:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics