It's all about the answers!

Ask a question

Assign User to WorkItem via REST


Ya Bin Dang (33151) | asked May 09 '13, 10:11 p.m.
JAZZ DEVELOPER
retagged May 10 '13, 2:32 a.m. by Krzysztof Ka┼║mierczyk (7.4k475103)

I'm trying to assgin a owner when creating a new workitem via REST (RTC 3.0.1), like this

<oslc_cm:ChangeRequest  xmlns:dc="http://purl.org/dc/terms/"   xmlns:rtc_cm="https://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/">
  <dc:title>A New Task</dc:title>
  <dc:description>This is new task</dc:description>
  <dc:type rdf:resource="https://locahost/ccm/oslc/types/_F0yOsH9QEeGrBq48NJj-8g/task"/>
  <rtc_cm:ownedBy rdf:resource="https://locahost/ccm/oslc/users/_ZfJqIP-kEeCh57Rz_rTX3w"/>
</oslc_cm:ChangeRequest>

However, the owner is always "Unassigned" in the return response. How can I do that?

Thanks a lot!

Accepted answer


permanent link
Stephane Leroy (1.4k149) | answered May 12 '13, 1:31 p.m.
JAZZ DEVELOPER
Hi Ya Bin,

based on the XML piece you provided, I believe your initial description phrase (and question title) mentioning "REST" would both need to be rephrased at the favor of OSLC instead.

Back to the core of your question:  I advise you to read this piece of information here:
https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20#Updating_Work_Items

Among other things, you'll find that "dcterms:contributor" is the right property to use (*)

Regards,
St├ęphane

(*): for OSLC_CM 2.0, you have to use HTTP headers:
- Accept: application/rdf+xml and
- OSLC-Core-Version: 2.0



Ya Bin Dang selected this answer as the correct answer

Your answer


Register or 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.