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.
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=""   xmlns:rtc_cm=""  xmlns:rdf=""  xmlns:oslc_cm="">
  <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"/>

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.
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:

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


(*): 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.