It's all about the answers!

Ask a question

Query Workitems by State and Type in OSLC 2.0


Nicole Cherches (113) | asked Jan 13 '22, 8:37 a.m.
edited Jan 13 '22, 8:38 a.m.
Hello,

I am having problems with a combined query. The weird thing is, that the two oslc.wheres work separately but as soon as I put them together in one URL they don't.

When running this query I get only workitems in closed state, however the second part with rtc_cm:type is ignored, so I get lots of different workitem types, not only Tasks.

I am using OSLC 2.0 and format application/rdf+xml.

2 answers



permanent link
Jim Amsden (29337) | answered Jan 13 '22, 8:44 a.m.

 OSLC Query only allows on instance of the oslc.where clause. Combine the two you have into one with an and operator.


permanent link
David Honey (1.8k17) | answered Jan 14 '22, 9:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

In addition to Jim's response, the query parameter values should be URL encoded. For example, for a query expression rtc_cm:state="{closed}" and rtc_cm:type="com.ibm.team.workitem.workItemType.task" the request should include ?oslc.where=rtc_cm%3Astate%3D%22%7Bclosed%7D%22%20and%20rtc_cm%3Atype%3D%22com.ibm.team.workitem.workItemType.task%22 .

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.