Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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?

0 votes


Accepted answer

Permanent link
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

0 votes


2 other answers

Permanent link
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

    0 votes

    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


    Permanent link
    This worked for me in RTC 6.0.1
          rtc_cm:type= "com.ibm.team.workitem.workItemType.defect"

    0 votes

    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,


    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 log in 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.

    Search context
    Follow this question

    By Email: 

    Once you sign in you will be able to subscribe for any updates here.

    By RSS:

    Answers
    Answers and Comments
    Question details
    × 10,930
    × 515

    Question asked: Aug 30 '12, 6:25 a.m.

    Question was seen: 10,927 times

    Last updated: Nov 29 '17, 10:29 p.m.

    Confirmation Cancel Confirm