It's all about the answers!

Ask a question

About Change the workitem state via Rest

Michael Lee (622) | asked Mar 12 '12, 9:06 a.m.
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:


with this body response:

after that i made a PUT like this:


with this body to send:

But didn't work. Did you know what I'm doing wrong?

One answer

permanent link
rob roy (6) | answered Nov 01 '13, 3:48 p.m.
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
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

Your answer

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