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,
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
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
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,
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.
Hi,
the trick is to downcast the value returned by IWorkItem.getValue(...):
hth,
--andre
Andre Weinand
Work Item Team
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