It's all about the answers!

Ask a question

precondition: writing to work item list attribute


Baris Erdemir (1812819) | asked Dec 31 '10, 7:29 a.m.
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,

3 answers



permanent link
Andre Weinand (4811) | answered Mar 14 '11, 2:07 p.m.
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

permanent link
Baris Erdemir (1812819) | answered Mar 15 '11, 3:45 a.m.
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.

permanent link
Andre Weinand (4811) | answered Mar 15 '11, 6:43 a.m.
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

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.