It's all about the answers!

Ask a question

Move workitem from a project area to another


Jaegon Yoo (9611314) | asked Apr 12 '11, 1:20 a.m.
Dear

I'm developing a server plug-in that moves workitem from a project area to another.

When status of workitem is in invalidated, it should be moved to another project area. So I'm developing a server plug-in for this.

I'm looking for APIs for that, but I can't find it.

Can anybody provide a pesudo-code for this purpose?

Any help will be appreciated.

2 answers



permanent link
Jaegon Yoo (9611314) | answered Apr 12 '11, 4:54 a.m.
I found how to do it.
Thanks everyone.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( newState!=null ) {

IProcessArea processArea = getProcessServerService().findProcessArea("Garbage", null);


IWorkItem workingCopy = (IWorkItem)newState.getWorkingCopy();
IWorkItemReferences workItemReferences = getWorkItemService().resolveWorkItemReferences(workingCopy, null);

WorkItemWrapper wiWrapper = new WorkItemWrapper(workingCopy, workItemReferences, "");
ServerCopyToProjectOperation op = new ServerCopyToProjectOperation(processArea.getProjectArea(), true);
op.run(wiWrapper, getWorkItemService());

done=true;
getWorkItemService().saveWorkItem2(workingCopy, null, null);

}

Dear

I'm developing a server plug-in that moves workitem from a project area to another.

When status of workitem is in invalidated, it should be moved to another project area. So I'm developing a server plug-in for this.

I'm looking for APIs for that, but I can't find it.

Can anybody provide a pesudo-code for this purpose?

Any help will be appreciated.

permanent link
vikrant kamble (1323897) | answered May 31 '16, 5:21 a.m.
 Hi Jaegon,
Did this solution worked for you, I mean did you moved work item from project area to another project area.
Could you please explain the process if work item is moved successfully

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.