It's all about the answers!

Ask a question

How can I retrieve the list of value for Filed Against field


WenHsin Lee (5184) | asked Jan 14 '10, 9:11 p.m.
I'm working on a client using Change Management REST APIs (https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2) to communicate with RTC. The Filed Against field is required as I tried to create a work item. Does anyone know how I can retrieve the list of value for Filed Against? Thanks a lot.

4 answers



permanent link
Patrick Streule (4.9k21) | answered Jan 15 '10, 5:38 a.m.
JAZZ DEVELOPER
I'm working on a client using Change Management REST APIs
(https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2)
to communicate with RTC. The Filed Against field is required as I
tried to create a work item. Does anyone know how I can retrieve the
list of value for Filed Against? Thanks a lot.

You can do this by following this discovery process:

1) Fetch the attributes of a project area:
https://localhost:9443/jazz/oslc/attributes/workitem.xml?oslc_cm.query=rtc_cm:projectArea=%22_VxEOwPrUEd6e5KDZV-2Thg%22
(this list can be cached for further reference)

2) An attribute entry looks like this:

<rtc_cm>
<dc>category</dc>
<dc>Filed Against</dc>
....
<rtc_cm>
<rtc_cm>
....
</rtc_cm>

3) You can then take the URL of rtc_cm:valueSet and get a list of
possible categories.

https://localhost:9443/jazz/oslc/attributes/workitem/_WmmvovrUEd6e5KDZV-2Thg/rtc_cm:valueSet

--
Regards,
Patrick
Jazz Work Item Team

permanent link
WenHsin Lee (5184) | answered Jan 15 '10, 2:08 p.m.
I'm working on a client using Change Management REST APIs
(https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2)
to communicate with RTC. The Filed Against field is required as I
tried to create a work item. Does anyone know how I can retrieve the
list of value for Filed Against? Thanks a lot.

You can do this by following this discovery process:

1) Fetch the attributes of a project area:
https://localhost:9443/jazz/oslc/attributes/workitem.xml?oslc_cm.query=rtc_cm:projectArea=%22_VxEOwPrUEd6e5KDZV-2Thg%22
(this list can be cached for further reference)

2) An attribute entry looks like this:

<rtc_cm>
<dc>category</dc>
<dc>Filed Against</dc>
....
<rtc_cm>
<rtc_cm>
....
</rtc_cm>

3) You can then take the URL of rtc_cm:valueSet and get a list of
possible categories.

https://localhost:9443/jazz/oslc/attributes/workitem/_WmmvovrUEd6e5KDZV-2Thg/rtc_cm:valueSet

--
Regards,
Patrick
Jazz Work Item Team

Hi Patrick,

Thanks for the information. I can retrieve the attributes I need now.

Since RTC supports OSLC CM 1.0 spec and has service provider implementation, I wonder if this attribute url is available through service looks up process?

Thanks for your help.

permanent link
Patrick Streule (4.9k21) | answered Jan 15 '10, 2:53 p.m.
JAZZ DEVELOPER
Thanks for the information. I can retrieve the attributes I need now.


Since RTC supports OSLC CM 1.0 spec and has service provider
implementation, I wonder if this attribute url is available through
service looks up process?

The attributes are not exposed in the discovery document yet. OSLC CM
1.0 doesn't cover this kind of meta-information but OSLC CM 2.0 is going
to address this issue. We could expose our custom element for this in
the service document, but I'd rather see this aligned with OSLC.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
James Hennessy (111) | answered Feb 28 '13, 1:48 p.m.
This question and answer was exactly what I was looking for, but unfortunately it doesn't seem to work for the server I'm using.  I get HTTP response code 500, "Internal Server Error", when I fetch the first URL containing "oslc/attributes/workitem.xml".  I even tried somebody else's code that works on their server and it gets the same error on ours.  The response body isn't helpful:

<?xml version="1.0" encoding="UTF-8"?><oslc_cm:error xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/">
<oslc_cm:status>500</oslc_cm:status>
<oslc_cm:message/>
</oslc_cm:error>

Is there an alternative way of retrieving this information?  Thanks for any help.

Your answer


Register or to post your answer.