How do you specify work item type when creating a draft using REST API?
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 https://jazz.net/jazz/oslc/contexts/_Q2fMII8EEd2Q-OW8dr3S5w/drafts/workitems
This is the content of newtask.json:
{
"dc:title": "This is Lori's task draft",
"dc:type":{"rdf:resource":"https:\/\/jazz.net\/jazz\/oslc\/types\/_Q2fMII8EEd2Q-OW8dr3S5w\/task"},
"rtc_cm:teamArea":{"rdf:resource": "https:\/\/jazz.net\/jazz\/oslc\/teamareas\/_I3iq8BTPEd6zz6xdSaYlGQ"},
"rtc_cm:filedAgainst":{"rdf:resource": "https:\/\/jazz.net\/jazz\/resource\/itemOid\/com.ibm.team.workitem.Category\/_v2l5gBTPEd6zz6xdSaYlGQ"},
}
The resulting draft is here, but it is type Defect rather than Task: https://jazz.net/jazz/web/projects/Jazz%20Foundation?draftId=_-LMWQHtdEeaRDptxjI8dMA#action=com.ibm.team.workitem.newWorkItem&ts=1473955450942&draftId=_-LMWQHtdEeaRDptxjI8dMA