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

WorkItem not updated after saveWorkItem2(...)

I try to programmatically set the state of a workItem... based on API documentation, the right way would be to give an actionId to the saveWorkItem2 operation:

[...]

IWorkItemServer workItemService = getService(IWorkItemServer.class);
workItemService.saveWorkItem2(storyItemWorkingCopy, null, "some.resolve.action.id");


This works, and returns an OK status - however, it does not seem to work, e.g. the workitem is not updated with the new state afterwards..

Any ideas?

0 votes



3 answers

Permanent link
I try to programmatically set the state of a workItem... based on API documentation, the right way would be to give an actionId to the saveWorkItem2 operation:

[...]

IWorkItemServer workItemService = getService(IWorkItemServer.class);
workItemService.saveWorkItem2(storyItemWorkingCopy, null, "some.resolve.action.id");


This works, and returns an OK status - however, it does not seem to work, e.g. the workitem is not updated with the new state afterwards..

Any ideas?


Are you saving the work item working copy after? so:

 storyItemWorkingCopy.save(IProgressMonitor p) 


If you are then without seeing the full code I'm not sure I can help

0 votes


Permanent link
Thanks for the point... it seems that I'm somehow mixing Service- with Client side API?

Just to be clear - I'm inside a server-side workItem Participant, and not on the client side.
Therefore, I have only "Services" and no WorkItemWorkingCopy instance (and no save() method), and no IWorkItemWorkingCopyManager and such, which are part of the "client" API ... my "WorkingCopy" is of type IWorkItem.
All I have is IWorkItemCommon and IWorkItemServer and IRepositoryItemService

So perhaps I'm using some bad pattern here?

thanks for any hint...



I try to programmatically set the state of a workItem... based on API documentation, the right way would be to give an actionId to the saveWorkItem2 operation:

[...]

IWorkItemServer workItemService = getService(IWorkItemServer.class);
workItemService.saveWorkItem2(storyItemWorkingCopy, null, "some.resolve.action.id");


This works, and returns an OK status - however, it does not seem to work, e.g. the workitem is not updated with the new state afterwards..

Any ideas?


Are you saving the work item working copy after? so:

 storyItemWorkingCopy.save(IProgressMonitor p) 


If you are then without seeing the full code I'm not sure I can help

0 votes


Permanent link
I think ti was me misunderstanding I've only used the client side so I wont be able to help unfortunately :/

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
× 10,958

Question asked: Sep 22 '11, 5:54 a.m.

Question was seen: 6,248 times

Last updated: Sep 22 '11, 5:54 a.m.

Confirmation Cancel Confirm