Filters for personal Assignments: assigned Users and Roles

In this article we gathered examples of useful Advanced Filters for Views and Visual Reports that help to select, hide or highlight data by personal Assignments such as assigned users and roles.

Assignable entities are work items such as User Stories, Bugs, Tasks, Features, Epics, Requests, Test Plan Runs, Test Plans. Filters below are work for any of these types of entities selected as cards.

All the filters are based on Assignments collection and AssignedUserproperty.

Entity Filter Result
Assignable ?Assignments.Count == 0 entities with no people assigned
Assignable ?Assignments.Count > 0 entities having at least one user assigned
Assignable ?Assignments.Count == 1 entities having single user assigned
Assignable ?Assignments.Where(Role is 'Developer') entities with Developer assigned
Assignable ?Assignments.Count(Role is 'Developer') > 1 entities with two or more Developers assigned
Assignable ?Assignments.Count(Role is 'Developer') == 1 entities with single Developer assigned
Assignable ?not Assignments.Where(Role is 'QA Engineer') entities without QA Engineer assigned
Assignable ?AssignedUser.Where(It is 'Brown')?Assignments.Where(GeneralUser.LastName is 'Brown') entities with user who has last name "Brown" assigned
Assignable ?AssignedUser.Where(FirstName is 'John' and LastName is 'Brown') entities with user "John Brown" assigned
Assignable ?AssignedUser.Where(Login is 'admin') stories assigned to a user with the "admin" login

Keywords supported in filters

Me keyword represents the logged users themselves.

Entity Filter Result
Assignable ?AssignedUser.Contains(Me) all the User Stories, Bugs and Tasks assigned to you (as currently logged in user)
Assignable ?Responsible is Me the entities that a user is assigned to or nobody is assigned to if their current state matches the user’s role
Assignable ?AssignedUser.Contains(Me) or AssignedTeams.Where(Team.TeamMembers.Where(User is Me)) entities assigned to you personally or to your team

Support for 'Me' keyword in Visual Reports

In Visual Reports Me keyword represents the user who is creator of the report, and not the logged in user who is viewing the report. At the moment Administrator cannot create single Visual Report for personal assignments that could be used by multiple team members. Separate reports should be created for each individual team member with filters by Login / Email / First and Last name applied instead of Me.

Filters for child collections

It is possible to apply filters for Assignments in child collections. For example, filter Features by assignments in user stories or bugs that are part of the feature.

Entity Filter Result
Feature ?UserStories.Where(AssignedUser.Contains(Me)) or Bugs.Where(AssignedUser.Contains(Me)) Features that contain user stories or bugs assigned to the currently logged in user

Filters of this kind are especially useful when applied to lanes (rows or columns). More information: Filters for rows and columns

More examples

Cases and rules can be combined together and this give your filters a real power and flexibility.

Entity Filter Result
Assignable ?AssignedUser.Contains(Me) and EntityState.IsFinal is False hide items that are already done from your personal ToDo list
Assignable ?Assignments.where(GeneralUser is Me and Role is 'Developer') items assigned to you as the Developer role only
Assignable ?Assignments.Count(Role is Me.Role) == 0 items in which your role have no assigned users
Assignable ?Assignments.where(GeneralUser.LastName is 'Brown' and Role.Name is 'Developer') items assigned to a user who has the last name 'Brown' as the Developer role only
Assignable ?AssignedUser.Contains(Me) or AssignedUser.Count == 0 items assigned to you and unassigned items
Assignable ?AssignedUser.Contains(Me) and (EntityState.isFinal is False or EndDate >= Today - 7(days)) items assigned to you that are either incomplete or recently done (completed over the past seven days)
Assignable ?Responsible is Me and AssignedUser.Contains(Me) and EntityState.IsFinal is False the filter used as built-in one for ToDo widget on Dashboards; only incomplete entities assigned to you and you're responsible for
Assignable ?Responsible is Me and Iteration.IsCurrent is True items you’re responsible for that are in progress now and belong to the current iteration only

It is also possible to filter entities by Creator (that is creator user): Filters by Creator