Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How change RTC work item state in OSLC

Hello!
I'm trying to change a work item state with a simple HTTP PUT request. I do a request:

Headers:
Content-Type - application/x-oslc-cm-change-request+xml
Accept - application/x-oslc-cm-change-request+xml

I tried several URLs, for example such ones:
  • https://localhost:9443/ccm/oslc/workitems/154?action=com.ibm.team.workitem.defectWorkflow.action.startWorking
  • https://localhost:9443/ccm/oslc/workitems/154?_action=com.ibm.team.workitem.defectWorkflow.action.startWorking
  • https://localhost:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/154?action=com.ibm.team.workitem.defectWorkflow.action.startWorking
  • https://localhost:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/154?_action=com.ibm.team.workitem.defectWorkflow.action.startWorking

Every request, I get a response:

<?xml version="1.0" encoding="UTF-8"?><oslc_cm:error xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/">
<oslc_cm:status>400</oslc_cm:status>
<oslc_cm:message>Malformed XML: Premature end of file.</oslc_cm:message>
</oslc_cm:error>

Can somebody tell me what is wrong?
Thank you!

0 votes



2 answers

Permanent link
Please see: https://www.google.com/search?q=change+RTC+work+item+state+in+OSLC+site%3Ajazz.net 

which leads to several hits. the first leads to https://jazz.net/forum/questions/32674/change-workitem-state-via-rest and hopefully addresses your question.

Using a search engine and appending site:jazz.net as a keyword leads to hits for these popular questions that have been answered already.

0 votes


Permanent link
It's a strange behavior of REST interface but I was able to change a state by a simple addition of request body like this one:

<?xml version="1.0" encoding="UTF-8"?><oslc_cm:ChangeRequest xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/" rdf:about="https://localhost:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/154" xmlns:dc="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/" xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/" xmlns:oslc_pl="http://open-services.net/ns/pl#">
</oslc_cm:ChangeRequest>

But I suspect that it's made for changing work item's properties simultaneously with state transition if necessary!

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,948

Question asked: May 27 '14, 5:07 a.m.

Question was seen: 4,416 times

Last updated: May 27 '14, 5:07 p.m.

Confirmation Cancel Confirm