Where are Reportable REST API queryable fields documented?
I am trying to use the Reportable REST API, but it seems extremely simplistic. I would like to find all open work items assigned to a given Team Area.
I have been using the following reference: https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI This looks from the documentation like it should work: https://rtdserver.com:9443/jazz/rpt/repository/workitem?fields=workitem/workItem[teamArea/name=%27myTeam%27%20%20and%20projectArea/name=%27ProjectArea%27]/%28id|summary|target/name|state/name%20|creator/name|owner/name|type/name|resolution/name|parent%29 But I get the following error: HTTP Status 500 - CRRED8022E: Non Queryable Field: teamArea/nameIt looks like only certain fields are queryable, but I cannot find which fields are queryable and which are not.
|
One answer
Hi Donald, The team area field of a work item is a computed field and not a real field in the database. I would suggest using the Work Item category field instead. Currently we do not have doc that documents which fields are queryable and which are not. Comments
Donald Mason
commented Mar 20 '13, 4:25 p.m.
Thanks for the category field suggestion. That will work for this query. How do I find all active versus all resolved work items? I thought about using the 'resolutionDate' field, but I cannot find any way to query if the field is set or not.
You can use the workItem/state/id field to find work items of a prticular state. Here is an example: https://server:port/ccm/rpt/repository/workitem?fields=workitem/workItem[state/id=5 or state/id=4]/(id|summary|state/name)
The ids of the states can found int the project area process specification source page in the Eclipse client. Or you could write the following URL to discover tall the possible states: https://server:port/ccm/rpt/repository/workitem?fields=workitem/projectArea[name='Some Project Area']/states/(id|name) You can also select the group of the state to find out which ones are open or in_progress states: https://server:port/ccm/rpt/repository/workitem?fields=workitem/projectArea[name='Some Project Area']/states/(id|name|group)
Donald Mason
commented Mar 21 '13, 9:20 a.m.
Rafik, I will give this a try, though it seems more complicated than testing for NULL values. Is there no way to test for values that are not set?
Donald Mason
commented Mar 21 '13, 9:56 a.m.
Ok, it looked like the group would be the easiest route, but it appears to be a Non Queryable Field as well:
Donald Mason
commented Mar 21 '13, 10:08 a.m.
Rafik, the example of getting states with id,name, and group looks like it works, but it looks like the id that is returned is very wrong and gives errors when used in other querries:
Donald Mason
commented Mar 21 '13, 10:53 a.m.
I have found that these long text looking ids work, to a point. I am now having issues with the ids that contain a : (colon) in them. I tried to escape them with %3A but I still get the following error:
HTTP Status 500 - CRRED0125E: Invalid value: SME. Expected "and" or "or"
Donald Mason
commented Mar 21 '13, 11:10 a.m.
Forget the last comment, I mistakenly used the name.
showing 5 of 8
show 3 more comments
|
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.