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

How do I query workitems by state via OSLC ?

Appreciate if someone can provide samples of query using OSLC (V1 spec) for:

a) state is "New"
b) severity is "High"
c) ownedBy "hoge@dummy.orz"

Suppose simple query URL is as follows:

https://dummy.orz:9443/ccm/oslc/contexts/_0_5h4C85EeCPsafujiko/workitems

As for a)

https://dummy.orz:9443/ccm/oslc/contexts/_0_5h4C85EeCPsafujiko/workitems?oslc_cm:query=rtc_cm:state="New"

does not work.

0 votes



2 answers

Permanent link
It is helpful to look at the content of a work item to see what all the attributes qualified names are, and you can see how the values are represented in this case, I think you need to use the literal string values.

I was able to search based on these examples for a Task with the Defect Workflow

?oslc_cm.query=rtc_cm%3Astate%3D%221%22
?oslc_cm.query=oslc_cm%3Aseverity%3D%22severity.literal.l3%22
?oslc_cm.query=rtc_cm%3AownedBy%3D%22_9NFgtYVOEd-rt83OFre0Xg%22


Last piece I just found if you want to chain them together use the CM Query syntax ' and '
http://open-services.net/bin/view/Main/CmQuerySyntaxV1


?oslc_cm.query=rtc_cm%3Astate%3D%221%22%20and%20oslc_cm%3Aseverity%3D%22severity.literal.l3%22%20and%20rtc_cm%3AownedBy%3D%22_9NFgtYVOEd-rt83OFre0Xg%22


-Sean

0 votes


Permanent link
Thanks for the info. After I checked RTC SDK V2, I realized I can use
special variables, like "{currentUser}" for user and "{new}", "{closed}" for state. This simplifies query statement.

But I believe that most of users are familiar with just literals in stead of hidden internal id.

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

Question asked: May 19 '11, 5:04 a.m.

Question was seen: 4,743 times

Last updated: May 19 '11, 5:04 a.m.

Confirmation Cancel Confirm