It's all about the answers!

Ask a question

How do you specify work item type when creating a draft using REST API?

Lori Ruffing (1738) | asked Sep 15 '16, 1:35 p.m.
 I am trying to specify that a "task" workitem type be created when I create a draft using the CURL command below, but the resulting draft is type "defect". The RTC project is Jazz Foundation in the example below, but I have found that the dc:type that I specify is ignored on more than just this project.

curl.exe -k -H "Content-Type: application/x-oslc-cm-change-request+json" -H "Accept: application/json" -X POST -d @newtask.json

This is the content of newtask.json:
    "dc:title": "This is Lori's task draft",        
    "rtc_cm:teamArea":{"rdf:resource": "https:\/\/\/jazz\/oslc\/teamareas\/_I3iq8BTPEd6zz6xdSaYlGQ"},
    "rtc_cm:filedAgainst":{"rdf:resource": "https:\/\/\/jazz\/resource\/itemOid\/\/_v2l5gBTPEd6zz6xdSaYlGQ"},       

The resulting draft is here, but it is type Defect rather than Task:

Accepted answer

permanent link
Ralph Schoon (62.0k33643) | answered Jun 05 '20, 8:56 a.m.
edited Jun 05 '20, 8:58 a.m.
Ralph Schoon selected this answer as the correct answer

One other answer

permanent link
Marcin Blacha (146110) | answered Jun 05 '20, 7:04 a.m.

Did you found a solution? On RTC 6.0.6 I have same problem.

Your answer

Register or to post your answer.