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 (1758) | 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 (63.2k33646) | 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 (1461214) | 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.

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.