Filtering workitems from saved query using GET, filterAttribute and filterValue parameters
- https://jazzserver:9443/ccm/web/projects/MyProjectArea#action=com.ibm.team.workitem.runSavedQuery&id=_SMOWoK3PEeO0x6KOcG5E-w&filterAttribute=id&filterValue=139
- https://jazzserver:9443/ccm/web/projects/MyProjectArea#action=com.ibm.team.workitem.runSavedQuery&id=_SMOWoK3PEeO0x6KOcG5E-w&filterAttribute=workItemType&filterValue=defect
- https://jazzserver:9443/ccm/web/projects/MyProjectArea#action=com.ibm.team.workitem.runSavedQuery&id=_SMOWoK3PEeO0x6KOcG5E-w&filterAttribute=link:com.ibm.team.workitem.linktype.relatedworkitem:target/id&filterValue=139
6 answers
-
Request URL:https://<host>:9443/ccm/service/com.ibm.team.workitem.common.internal.rest.IQueryRestService/getResultSet
not sure what I'm doing wrong.... I'm using an existing query and try to select a number of value IDs.... I always get the following error:
Error: com.ibm.team.repository.web.transport.ServiceRequest(): invalid requestParameters parameter: [object Object]
The request I'm using:
https://swgjazz.ibm.com:8052/jazz/web/projects/Business%20Process%20Manager #action=com.ibm.team.workitem.runSavedQuery&id=_G5Pj8GTqEeW_a_znQFYvCQ&filterAttribute=id&jsonParameterValues={"id2":{"attributeId":"id","operator":"is","values":[200009,200010],"variables":[]}}&maxResults=50&projectAreaItemId=_xNY7cMzrEeCeP-edQ3dTlQ&startIndex=0
Any suggestion appreciated. Thx.
Not sure whether I should put it as an answer or a comment somewhere, but here it goes.
I have verified that it still works in RTC 6.0.4. Two tips I will share here if anybody is going to do similar things.
1. Make sure that the saved query has the dynamic filter(s).
2. Add the query to the Work Item widget, capture the HTTP traffic to see what the "jsonParameters" parameter should be - it will be much easier than constructing it from scratch.
For reference, the URL that I have working looks like this (Marco's New Defects in my testing environment):
https://clm.jkebanking.net:9443/ccm/web/projects/JKE%20Banking%20(Change%20Management)#action=com.ibm.team.workitem.runSavedQuery&id=__gDG8NlZEeeI6JbiMe-jFQ&jsonParameterValues={"owner341":{"attributeId":"owner","operator":"is","values":["_cvHzANZWEeexRYuhIxDBSQ"],"variables":[]},"internalState351":{"attributeId":"internalState","operator":"is","values":["1"],"variables":[]}}