It's all about the answers!

Ask a question

Query on reassigned work items

Mahari Hill (4861182230) | asked Jun 08 '15, 9:37 a.m.
CLM 502

In Iteration 1, work item 1234 was created and assigned to File Against = "Reports", the Reporting Team. At the end of the iteration, this work item and many more were reassigned to different category/teams.

Is there a way for me to query against all work items in Iteration 1 that were incorrectly assigned to the Reporting team?

Don Yang commented Jun 08 '15, 9:24 p.m.

The questions is not clear. You can create a query with "filed against" in the column so that you will know which workitem is assigned to which category. that is, all the work items assigned to reporting team should be able to query. However, how do you tell whether it is correct or not? what is the criteria in your case?

One answer

permanent link
Donald Nong (14.5k614) | answered Jun 09 '15, 3:34 a.m.
Is it possible to list all the work items that once were assigned with such values, but it is up to you to decide whether it is "incorrect" or not - the query will not do it for you. Use the below URL utilizing the reportable REST API.
/ccm/rpt/repository/workitem?fields=workitem/workItem/(id|summary|itemHistory[target/name="Iteration 1" and category/name="Reports"]/(id|target/*|category/*))
This URL will show all the work items, but only those meeting the requirement will have the "itemHistory" shown. So you should be able to tell which ones to look at.
Note 1: The query runs against the entire repository so there will be a big hit on the performance.
Note 2: You may want to change the filtering to [id=###] first to decide what "target" and "category" you should aim for.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.