Change the status of workitem in RTC(4.0) using REST API
Hi Team,
I have tried to change the status of workitem using Rest Api in RTC 4.0.6. But not able to update status of workitem. Headers: Accept:text/json Content-Type:application/x-oslc-cm-change-request+json If-Match:29c27c1b-cbfa-3745-baf6 URL: https://ratsuitein131.in.dst.ibm.com:9444/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/102066 JSON Body { "dc:identifier":102066, "rtc_cm:state":{ "rdf:resource":"https://ratsuitein131.in.dst.ibm.com:9444/ccm/oslc/workflows/_S-BFgSK4EeKBhX83Q/states/bugzillaWorkflow/3" } } Using PUT Method return these response. Response Headers Status Code: 412 Precondition Failed Cache-Control: private, max-age=0, must-revalidate Connection: Close Content-Language: en-US Content-Type: text/json;charset=UTF-8 Date: Thu, 01 Jan 2015 07:11:55 GMT Expires: Thu, 01 Jan 2015 07:11:56 GMT Transfer-Encoding: chunked Vary: Accept X-Powered-By: Servlet/3.0 Respose Body { "oslc_cm:message": "CRJAZ0007I Unable to update the item identified by \"https:\/\/ratsuitein131.in.dst.ibm.com:9444\/ccm\/service \/com.ibm.team.repository.common.internal.IItemRestService\/itemName\/com.ibm.team.workitem.WorkItem\/102066\" - there is a later version of this item available.", "oslc_cm:status": 412 } Some ref link that I already have followed: https://jazz.net/forum/questions/45192/update-workitem-status-with-oslc-api. https://jazz.net/forum/questions/32674/change-workitem-state-via-rest?redirect=%2Fforum%2Fquestions%2F32674%2Fchange-workitem-state-via-rest https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Update_a_Work_Item https://www.youtube.com/watch?v=eXVWtiuygr0 I would appreciate if anyone could gives some lights. Regards, Rupam |
One 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.