Manual Activities Assigned to Me or My Group – without Closed Activities

If you want a view for your manual activities that only show “Activities Assigned to Me and My Group” but not the closed activities, you could use the following example. Default the view “Activities Assigned to Me” shows all manual activities assigned to you, which also means all the closed activities. In the following example I wanted to exclude the closed activities in the view.

Picture of the view.

manualactivity

In the example I have used the “Advanced View Editor 2.0 for SCSM 2012 Free Edition” to create the view. This is the xml code you need to paste into the tool to get the view.

<QueryCriteria Adapter=”omsdk://Adapters/Criteria” xmlns=”http://tempuri.org/Criteria.xsd“>
<Criteria>
<FreeformCriteria>
<Freeform>
<Criteria xmlns=”http://Microsoft.EnterpriseManagement.Core.Criteria/“>
<Expression>
<And>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpressionLeft>
<Property>$Context/Property[Type=’CoreActivity!System.WorkItem.Activity’]/Status$</Property>
</ValueExpressionLeft>
<Operator>Equal</Operator>
<ValueExpressionRight>
<Value>{50c667cf-84e5-97f8-f6f8-d8acd99f181c}</Value>
</ValueExpressionRight>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpressionLeft>
<Property>$Context/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=’CoreActivity!System.WorkItem.Activity’]/Status$</Property>
</ValueExpressionLeft>
<Operator>Equal</Operator>
<ValueExpressionRight>
<Value>{d544258f-24da-1cf3-c230-b057aaa66bed}</Value>
</ValueExpressionRight>
</SimpleExpression>
</Expression>
</Or>
</Expression>
<Expression>
<In>
<GenericProperty Path=”$Context/Path[Relationship=’WorkItem!System.WorkItemAssignedToUser’ SeedRole=’Source’]$”>Id</GenericProperty>
<Values>
<Token>[me]</Token>
<Token>[mygroups]</Token>
</Values>
</In>
</Expression>
</And>
</Expression>
</Criteria>
</Freeform>
</FreeformCriteria>
</Criteria>
</QueryCriteria>

2 Responses to Manual Activities Assigned to Me or My Group – without Closed Activities

  1. matt July 4, 2013 at 23:37 #

    what am i missing, I have selected ‘Manual Activity’ for the base class.

    When I paste and try to save in a brand new MP I get this…

    Date: 7/4/2013 4:35:53 PM
    Application: Edit my groups
    Application Version: 7.5.2905.0
    Severity: Error
    Message: Failed to verify reference to ViewType: GridViewType

    : Verification failed with 1 errors:
    ——————————————————-
    Error 1:
    Found error in 1|ManagementPack.c67a144c38814ce7afc6e0efea7f54b4|1.0.0.0|View.b5250238905e41548d575e96127f0d32|| with message:
    Failed to verify reference to ViewType: GridViewType
    : Cannot resolve identifier CoreActivity!System.WorkItem.Activity in the context of management pack ManagementPack.c67a144c38814ce7afc6e0efea7f54b4. Unknown alias: CoreActivity

    ——————————————————-

    : Failed to verify reference to ViewType: GridViewType

    : Cannot resolve identifier CoreActivity!System.WorkItem.Activity in the context of management pack ManagementPack.c67a144c38814ce7afc6e0efea7f54b4. Unknown alias: CoreActivity

    • Jonathan July 5, 2013 at 19:26 #

      Have you imported the MP of the tool “Advanced View Editor 2.0 for SCSM 2012 Free Edition”? When you have imported it you need to choose “Edit View (Advanced)” to edit the view. Paste the XML in to the section “Show XML Editor”.

Leave a Reply to Jonathan Click here to cancel reply.