About Change the workitem state via Rest
Hi, I have a problem changing a workitem state, and i thought if you could help me.
I've trying to change the workitem status, but isn't work
I'm doing this with Poster add-on for Firefox
my first step was doing a GET in a workitem like this:
https://jazz-server:9443/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/519?oslc_cm.properties=rtc_cm:state
with this body response:
http://img40.imageshack.us/img40/4959/gett.png
after that i made a PUT like this:
https://jazz-server:9443/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/519?_action=bugzillaWorkflow.action.startWorking
with this body to send:
http://img190.imageshack.us/img190/462/puti.png
But didn't work. Did you know what I'm doing wrong?
I've trying to change the workitem status, but isn't work
I'm doing this with Poster add-on for Firefox
my first step was doing a GET in a workitem like this:
https://jazz-server:9443/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/519?oslc_cm.properties=rtc_cm:state
with this body response:
http://img40.imageshack.us/img40/4959/gett.png
after that i made a PUT like this:
https://jazz-server:9443/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/519?_action=bugzillaWorkflow.action.startWorking
with this body to send:
http://img190.imageshack.us/img190/462/puti.png
But didn't work. Did you know what I'm doing wrong?
One answer
Hi
Login to rtc
curl -s -o two.htm -k -c $COOKIES "$HOST/authenticated/identity"
curl -s -o three.htm -k -L -b $COOKIES -c $COOKIES --data-urlencode j_username="${USER}" --data-urlencode j_password="${PASSWORD}" "$HOST/authenticated/j_security_check"
Get the work item
curl -s -k -b $COOKIES -o ${TASK}.json -H "Content-Type:\ application/x-oslc-cm-change-request+json" -H "Accept:\ application/x-oslc-cm-change-request+json" $URL
echo set machine ${TASK} up
URL="https://yourhost:9449/jazz/oslc/workitems/${TASK}.json?_action=com.ibm.team.workitem.taskWorkflow.action.a3"
Look in your process Cofnig source for the name
Post the data back to same URL with the added prameter
curl -s -k -b $COOKIES -o ${TASK}.out -H "Content-Type: application/x-oslc-cm-change-request+json" -H "Accept: application/x-oslc-cm-change-request+json" -X PUT --data-binary @${TASK}.json $URL
Login to rtc
curl -s -o two.htm -k -c $COOKIES "$HOST/authenticated/identity"
curl -s -o three.htm -k -L -b $COOKIES -c $COOKIES --data-urlencode j_username="${USER}" --data-urlencode j_password="${PASSWORD}" "$HOST/authenticated/j_security_check"
Get the work item
curl -s -k -b $COOKIES -o ${TASK}.json -H "Content-Type:\ application/x-oslc-cm-change-request+json" -H "Accept:\ application/x-oslc-cm-change-request+json" $URL
echo set machine ${TASK} up
URL="https://yourhost:9449/jazz/oslc/workitems/${TASK}.json?_action=com.ibm.team.workitem.taskWorkflow.action.a3"
Look in your process Cofnig source for the name
Post the data back to same URL with the added prameter
curl -s -k -b $COOKIES -o ${TASK}.out -H "Content-Type: application/x-oslc-cm-change-request+json" -H "Accept: application/x-oslc-cm-change-request+json" -X PUT --data-binary @${TASK}.json $URL