It's all about the answers!

Ask a question

OSLC 2.0 Query with oslc.where parameter dcterms:type returns 400 unknown attribute ID


Melanie Finke (7721520) | asked Aug 30 '12, 6:25 a.m.
edited Aug 30 '12, 8:19 a.m.
Hi,

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


permanent link
Takehiko Amano (1.3k3641) | answered Sep 04 '12, 12:30 a.m.
JAZZ DEVELOPER
I see this question before, please refer to my answer in the entry.

https://jazz.net/forum/questions/85789/oslc-simple-query

I believe this is defect.

Melanie Finke selected this answer as the correct answer

2 other answers



permanent link
David MICHEL (1471843) | answered Aug 02 '13, 9:54 p.m.
Hello,
   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:
  • <rdf:RDF
  • xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  • xmlns:oslc="http://open-services.net/ns/core#" >
  • <rdf:Description rdf:nodeID="A0">
  • <oslc:message>Unknown attribute id: [http://open-services.net/ns/cm#status]</oslc:message>
  • <oslc:statusCode>400</oslc:statusCode>
  • <rdf:type rdf:resource="http://open-services.net/ns/core#Error"/>
  • </rdf:Description>
  • </rdf:RDF>
  • Could you confirm me that is or not the same defect ?

    Thank you in advance

    Best regards

    Comments
    Takehiko Amano commented Aug 05 '13, 4:22 a.m.
    JAZZ DEVELOPER

    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.


    David MICHEL commented Aug 05 '13, 4:48 a.m.

    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


    permanent link
    Markus Schneider (1) | answered Dec 06 '15, 5:02 a.m.
    This worked for me in RTC 6.0.1
          rtc_cm:type= "com.ibm.team.workitem.workItemType.defect"

    Comments
    Donald Nong commented Dec 06 '15, 5:47 p.m.

    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


    Binoy D'costa commented Nov 29 '17, 10:29 p.m.

    Hi Donald,


    This is not fixed in 6.0.3. I still get the unknown attribute id error. Can you please confirm? The workaround mentioned by Markus seems to be working.

    Thanks,
    Binoy

    Your answer


    Register or to post your answer.