How to access Attributes of Workitems
Accepted answer
1. an Advisor cannot change attributes.. but a Participant can
2. you must get the WorkingCopy of the IWorkitem object, otherwise it is read only
3. there are methods on IWorkitem to set the builtin attributes, for example
Sets the priority to the given identifier.
and
Sets the value of the given attribute.
for all the rest (custom attributes)
Sam
2. you must get the WorkingCopy of the IWorkitem object, otherwise it is read only
3. there are methods on IWorkitem to set the builtin attributes, for example
setPriority(Identifier<IPriority> value)
Sets the priority to the given identifier.
and
setValue(IAttribute attribute,
java.lang.Object value)
Sets the value of the given attribute.
for all the rest (custom attributes)
Sam
One other answer
Sam,
I disagree with the point 1.
Actually the rule is that "You should not write code in Operation Advisors to modify a field of a Work item". It does'nt mean that it won't work if you use setvalue method in Operation Advisor..
I have tested the setvalue method in the Operation Advisor itslef [Server Side] and it is working fine.
Regards
Muthukumar.C
I disagree with the point 1.
Actually the rule is that "You should not write code in Operation Advisors to modify a field of a Work item". It does'nt mean that it won't work if you use setvalue method in Operation Advisor..
I have tested the setvalue method in the Operation Advisor itslef [Server Side] and it is working fine.
Regards
Muthukumar.C