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

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!

0 votes


Accepted answer

Permanent link
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

1 vote

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
× 10,938
× 479

Question asked: May 09 '13, 10:11 p.m.

Question was seen: 4,928 times

Last updated: May 12 '13, 1:31 p.m.

Confirmation Cancel Confirm