Examples of creating queries
You can find work items by setting constraints on their attributes.
These dimensions are an artificial categorization of attributes for illustrative purposes. They are used as a set of best practices for creating structured queries. The dimensions are not mutually exclusive; they can overlap in different contexts.
The examples that follow are grouped by these dimensions.
Core dimension: The kind of work item
Example attributes: Type, State, Resolution, Severity, Priority
Often, you look for certain work items that can be distinguished by their type, state, severity, or priority. For example, you might want to find all Story or Track Build items, all Unresolved or Verified items, or items of High or Low importance. Setting these types of conditions is a good starting point for creating more complex queries that filter the results with additional conditions.
The core dimension reflects the main attributes of a work item. Placing constraints on attributes in this dimension helps retrieve the information that you are looking for.
Example 1: Find all fixed but unverified work items

Example 2: Find all unresolved defects

Example 3: Find all high priority or high severity work items that are still unresolved

Content dimension: What the work item is about
Example attributes: ID, Summary, Description, Comments, Tags, Duration, Estimate, custom attributes
Using other content attributes, such as Tags, Duration, Estimate, and custom attributes, can provide selective results when you know these values in existing work items.
Example 4 (builds on Example 2): Find all unresolved defects that contain the text test failure

Example 5: Find all work items that have a custom attribute that is named Build Notes with a Due Date of 10 days from now

People dimension: Who is involved
Example attributes: Filed Against, Team Area, Owner, Creator, Resolver, Modifier, Approvers, Subscribers, Commenters
When you know people or teams that might be involved in work items, you can set constraints on attributes in the people dimension. The people dimension defines the relationship of work items to IBM® Engineering Workflow Management users and teams. You can use the people dimension to set constraints on any attribute of the Contributor, Team Area, or Category type. With the people dimension, you can specify who is involved in the work items that you are looking for. For example, users can create, modify, own, or resolve work items. You can find teams by setting constraints on the Team Area and Filed Against attributes.
Example 6 (builds on Example 1): Find all fixed but unverified work items in the Work Item Team Area

Example 7 (builds on Example 3): Find all high-priority or high-severity work items that were created by people outside your organization and that are unresolved

Temporal dimension: When events happened to the work item
Example attributes: Planned For, Approvals, Creation Date, Resolution Date, Due Date, Modification Date
If you know about events that happened to your work items, you can use attributes from the temporal dimension to find these items. Most conditions in this dimension specify events that occurred within a certain time range or at a certain point in time. However, planning-related and verification-related attributes are included in this dimension as well because planning looks to the future and approvals confirm past activity on work items. Placing constraints on any attribute of the Timestamp, Iteration, or Approval type identifies when an event occurred and, therefore, is considered a search on the temporal dimension.
Example 8 (builds on Example 1): Find all fixed but unverified work items of the Work Item Team Area that were fixed during the current iteration

Structural dimension: The relationships of the work item
Example attributes: Related, Children, Blocks, Attachments, Resolves, Mentions, Change Sets
The structural dimension refers to structural relationships and links both between work items and with other artifacts. Query conditions in the structural dimension specify how work items relate to other work items and artifacts within the IBM Engineering Lifecycle Management.
Linking employs link types to specify relationships between work items. Example link types include Related, Blocks, and Tested By. Linking can be useful, for example, if you know that certain tasks are children of stories.
Artifact relationships, which are defined by artifacts such as attachments, builds, and change sets, show a relationship with the queried work items. If you know about such relationships, you can selectively query for some work items.
Example 9 (builds on Example 2): Find all unresolved defects in the Work Item Team Area that block other teams


Example 11: Find all defects and enhancements in the Work Item Team Area that depend on another unresolved work item

Example 12: Find all work items that have an attachment of the .png image type

Example 13: Find all fixed work items that are not included in a build

Example 14: Find all stories without children
