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

precondition: writing to work item list attribute

Hi,
I have a "work item list" attribute in a custom work item.
In a precondition, I have a list of work items (UUID, work item number couples)
I want to write each work item; to "work item list" attribute of a work item that is being saved.
Can you please provide an example for that purpose?

Thank you,

0 votes



3 answers

Permanent link
Hi,

Advisors may not make modifications to data which is persisted in the repository (please see https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide#Adding_New_Operation_Advisors)

--andre


Andre Weinand
Work Item Team

0 votes


Permanent link
Hi,

Advisors may not make modifications to data which is persisted in the repository (please see https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide#Adding_New_Operation_Advisors)

--andre


Andre Weinand
Work Item Team


Hi Andre,
Thaks for your answer, we are taking our own risk by modifying data in operation advisor. Can you please provide an example API if this is possible?
Please let us know if this is not possible.

0 votes


Permanent link
Hi,
the trick is to downcast the value returned by IWorkItem.getValue(...):

IAttribute myWorkitemListAttribute= ...

IWorkItem workitem= ...
IWorkItem anotherWorkitem= ...

List list= (List) workitem.getValue(myWorkitemListAttribute);
list.add(anotherWorkitem);

// save workitem

hth,
--andre


Andre Weinand
Work Item Team

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,938

Question asked: Dec 31 '10, 7:29 a.m.

Question was seen: 5,477 times

Last updated: Dec 31 '10, 7:29 a.m.

Confirmation Cancel Confirm