Assign User to WorkItem via REST
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
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