OSLC 2.0 Query with oslc.where parameter dcterms:type returns 400 unknown attribute ID
I try to get only WorkItems of type defect by OSLC 2.0 in application/rdf+xml format.
At the Jazz Team Wiki I found a example to query workItems with a specific title.
https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20#Query_Capabilities
?oslc.where=dcterms:title=%22adoption%2A%22&oslc.prefix=dcterms=%3Chttp://purl.org/dc/terms/%3E
Taking that as an example I tried to get all defects like that:
?oslc.where=dcterms:type=%22defect%22&oslc.prefix=dcterms=%3Chttp://purl.org/dc/terms/%3E
The example works fine, but my query returns statuscode 400 unknown attribute ID:
[http://purl.org/dc/terms/type]
Looking at a representation of a Workitem I see there is a
<dcterms:type>Task</dcterms:type> tag.
Do I have to modify somethingelse to get the work Items of a specific type?
Accepted answer
2 other answers
Comments
This is the known workaround. The problem is with "dc:type" or "dcterms:type". The fix is targeted to 6.0.2 Sprint 1.
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/360848
Hi Donald,
I have the same issue with the parameter oslc_cm:status. Is it the same defect or I have made something wrong ?
My environment is:
RTC 4.0.3
FIREFOX: V22
Plugin: RESTClient
Header: Accept: application/rdf+xml and OSLC-Core-Version:2.0
Request GET: <server>/ccm/oslc/contexts/<project areas ID>/workitems?oslc.where=oslc_cm:status="new"
Answer of the request:
Thank you in advance
Best regards
Comments
This looks like the same defect. To work around, use rtc_cm:state with the last string of state. For example, to find "New", use like this.
workitems?oslc.where=rtc_cm:state="1"&oslc.select=oslc_cm:status,dcterms:title
To find the string value of each state, use
ccm/oslc/workflows/<project area>/states/com.ibm.team.workitem.taskWorkflow
This is for task work flow.
I have tried, just now and I have no more the error message but I get all the workitem. The condition oslc.where seems not to be taken account. I set any value for rtc_cm:state and I get all the time the same result.
Do you have an idea ?
Thank in advance