How Can I Change Work Item Type via OSLC API?
I was pretty sure someone else would have had this question, but I've searched here on the forums and haven't found anything so I thought I would ask.
I've been able to successfully manipulate work items in the past using the OSLC API. Currently I am trying to change a Work Item's type. I am passing XML specifying a new value for the dcterms:type attribute. The http response back from the server indicates "Ok" and includes XML for the work item (no error message of any kind). However, the type remains unchanged.
I did notice one oddity. I'm trying to change the work item from an execution item to a planning item and when I view the history of the work item, the "Actual Start Date" has changed from "Unassigned" to Now. This suggests that something under the hood actually occurred, but there is no indication of it in the presentation of the work item. The history does not show any other change.
Is there a special procedure that must be followed in order to change work item type via OSLC? Is it unsupported?
Accepted answer
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:oslc_cm="http://open-services.net/ns/cm#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rtc_ext="http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/"
xmlns:oslc_cmx="http://open-services.net/ns/cm-x#"
xmlns:acp="http://jazz.net/ns/acp#"
xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:oslc_pl="http://open-services.net/ns/pl#" >
<rdf:Description rdf:about="https://<server>:<port>/ccm/oslc/workitems/_sy61IK2SEeOZZsxCNqN2HA/">
<rtc_cm:type rdf:resource="https://<server>:<port>/ccm/oslc/types/_YAOpUK2SEeOZZsxCNqN2HA/defect"/>
<dcterms:type rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Defect</dcterms:type>
</rdf:Description>
</rdf:RDF>
Comments
Charlie Seo
Jun 01 '14, 9:26 p.m.How did you change the work item type? Using PUT to update an existing workitem? I'm doubtful if that works since changing resoruce type would require other conditions to be met such as different attribute types and mandatory field.
If you could share more detailed steps you performed, that would easier for SME here to answer your question.