It's all about the answers!

Ask a question

How to get stateid of workitem


silencehill wu (5022632) | asked Jan 16 '14, 10:43 a.m.

I am writing source to move a workitem from a project area to the other project area.

So I post below link  to rtc to move workitem using apache httpclient.

/service/com.ibm.team.workitem.common.internal.rest.IWorkItemRestService/moveWorkItem

But this post need  lasted stateid as argument. I only have workitem id and workitem uuid, how to get lastest stateid?

I have ever use link https://rtcserver:9446/ccm/oslc/workitems/255.xml  to get workitem info, but no stateid in the xml.

below is the sample of argument to post .

  formparams.add(
   new BasicNameValuePair("additionalSaveParameters", "com.ibm.team.workitem.common.internal.updateBacklinks"));
  formparams.add(new BasicNameValuePair("itemId", workItemUuid));
  formparams.add(new BasicNameValuePair("move","true"));
  formparams.add(new BasicNameValuePair("projectAreaItemId",paUuid));
  formparams.add(new BasicNameValuePair("sanitizeHTML","true"));
  formparams.add(new BasicNameValuePair("type", "mt缺陷"));

 formparams.add(new BasicNameValuePair("stateId", "_u0qAgX3IEeO-J4xM9RcJqg"));

String url= hostApp + "/service/com.ibm.team.workitem.common.internal.rest.IWorkItemRestService/moveWorkItem";
  
  requestPost(url, formparams);

Please tell me how to get a work item  stateid. Otherwise, if you have any other method can move workitem will be better more, please advise to me.

Please don't use RTC-SDK. This project did not use any RTC-SDK lib.

Best Regards

2 answers



permanent link
sam detweiler (12.5k6195201) | answered Jan 19 '14, 10:35 a.m.
see this topic
https://jazz.net/forum/questions/32674/change-workitem-state-via-rest

permanent link
silencehill wu (5022632) | answered Jan 19 '14, 6:50 a.m.
I am stucked by stateid, please give me an advise.

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.