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

How to access Attributes of Workitems

I am coding a plugin , in which I need to set the attributes of a work item.
If I have IWorkItem instance available and the attribute ID as well
then,
How Can I do that ?

0 votes


Accepted answer

Permanent link
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
    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


Sarthak Sharma selected this answer as the correct answer

1 vote


One other answer

Permanent link
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

1 vote

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
× 12,019
× 10,936

Question asked: Jun 28 '12, 4:25 a.m.

Question was seen: 5,316 times

Last updated: Jun 29 '12, 12:49 a.m.

Confirmation Cancel Confirm