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

Query only defect, type/name='Defect' -Invalid Query: type/name='Defect'

I'd like to query only workitem which type is 'defect'. When  'and type/name='Defect' is appended,  it doesn't work. What am I missing?

Working:
https://compjazz.torolab.ibm.com:9443/jazz/rpt/repository/workitem?fields=workitem/workItem[projectArea/name='XL Compilers']/summary

NOT working: appended (and type/name='Defect)
https://compjazz.torolab.ibm.com:9443/jazz/rpt/repository/workitem?fields=workitem/workItem[projectArea/name='XL Compilers' and type/name='Defect' ]/summary

Error 500: CRRED8029E: Invalid Query: type/name='Defect'

0 votes

Comments

I had the same issue in the past. The root cause is that 'type' is reserved keyword. Unfortunately I don't know the work around :-(

Best regards,
Krzysztof Kazmierczyk



2 answers

Permanent link
Try https://compjazz.torolab.ibm.com:9443/jazz/rpt/repository/workitem?fields=workitem/workItem[projectArea/name='XL Compilers' and type/id='defect']/summary

0 votes

Comments

Thanks for your comment, but it doesn't work. It returns:

Error 500: CRRED8029E: Invalid Query: type/id='defect'



For other users, by the way, the API we are referring to is as follows

https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI?errno=2

...
com.ibm.team.workitem.WorkItemType

This element represents the type of a work item. Work item types are process-dependent.

Properties:

  • id (type: xs:string). The id of the type (e.g. "com.ibm.team.workitem.defect"), unique in a repository.
  • name (type: xs:string). The name of the type (e.g. "Defect"). Not necessarily unique.
...

What version of RTC are you using?  The query in my answer works on 4.0, but  I haven't tried it in earlier versions. 


Permanent link
As a work around, I tried to achieve the same using OSLC as follows:
https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2

Unfortunately, use of nested things doesn't work well.

The complete path is:

https://compjazz.torolab.ibm.com:9443/jazz/oslc/contexts/_NmIe8D8qEd6jzOcwVhPAgw/workitems?oslc_cm.query=rtc_cm:ownedBy=%22_IDAwAEb-Ed6ZILcqUy1ErQ%22&oslc_cm.properties=rtc_cm:ownedBy{rtc_cm:userId}

above works

https://compjazz.torolab.ibm.com:9443/jazz/oslc/contexts/_NmIe8D8qEd6jzOcwVhPAgw/workitems?oslc_cm.query=rtc_cm:ownedBy{rtc_cm:userId=%22rzurob@ca.ibm.com%22}&oslc_cm.properties=rtc_cm:ownedBy{rtc_cm:userId}

above doesn't work ( I added '{rtc_cm:userId="rzurob@ca.ibm.com"}' after 'rtc_cm:ownedBy' )

0 votes

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
× 12,019
× 478

Question asked: Mar 22 '13, 6:29 p.m.

Question was seen: 5,637 times

Last updated: Mar 28 '13, 10:50 a.m.

Confirmation Cancel Confirm