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
Assuming that the source type and the target type are compatible, you can surely change the work item type using OSLC with the HTTP PUT option. But I only manage to do it with the URI with the internal Id. Here is a sample of the PUT body and the resource URI is in the rdf:about tag.I can change the type of the same work item from Task to Story to Defect in the JKE Banking sample project, without any visible problems.
Nate Decker selected this answer as the correct answer
|
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.
Comments
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.