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

How to get stateid of workitem

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

0 votes



2 answers

Permanent link
I am stucked by stateid, please give me an advise.

0 votes


Permanent link
see this topic
https://jazz.net/forum/questions/32674/change-workitem-state-via-rest

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
× 11,044

Question asked: Jan 16 '14, 10:43 a.m.

Question was seen: 6,293 times

Last updated: Jan 19 '14, 10:35 a.m.

Confirmation Cancel Confirm