Blog Post

System Center Blog
2 MIN READ

How to update views to change the criteria from “Assigned to me” to “Assigned to me or a group that I belong to”

System-Center-Team's avatar
Feb 15, 2019
First published on TECHNET on Apr 30, 2010

Our out of the box views contain a few views like “Change Requests: Assigned to Me”, “Activities Assigned to Me”, “My Incidents” etc. These views only display objects where the criteria match the current user. You can update these views or create new views where you would want the criteria to match the current user or a group the current user belongs to.

There is a way to do this in the management pack. The UI currently does not support this. So you will have to update the management pack xml.

1.  Export the Management Pack that contains the view you want to update. To do this, In the Service Manager console, Go to the Administration->Management Packs view, Select the unsealed management pack and click Export in the task pane. For more information on exporting management packs see Hacking Management Pack XML Like a Pro .

2.  Make a backup of the Management Pack in case you need to go back.

3.  I will use the ChangeManagement.Views.ChangeRequestsAssignedToMe view as an example here.

4.  Open the Management Pack in the editor and find the <Criteria> tag in the View that you want to update.

5.  Under the criteria look for the expression

<Expression>

<SimpleExpression>

<ValueExpressionLeft>

<GenericProperty Path="$Context/Path[Relationship='WorkItem!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>

</ValueExpressionLeft>

<Operator>Equal</Operator>

<ValueExpressionRight>

<Token>[me]</Token>

</ValueExpressionRight>

</SimpleExpression>

</Expression>

6.  Replace the above expression with

<Expression>

<In>

<GenericProperty Path="$Context/Path[Relationship='WorkItem!System.WorkItemAssignedToUser' SeedRole='Source']$">Id</GenericProperty>

<Values>

<Token>[me]</Token>

<Token>[mygroups]</Token>

</Values>

</In>

</Expression>

PS. For other views make sure the Path in the replaced xml matches the Path in the original xml.

7.       Save and import the MP.

Updated Mar 11, 2019
Version 4.0
No CommentsBe the first to comment