It's all about the answers!

Ask a question

Retrieving IWorkItem custom attribute value


Gabriel Castro (1216) | asked Jun 19 '08, 11:10 a.m.
I'm having some trouble retrieving the value of a custom attribute from an IWorkItem. Is there anything special I should be doing other than calling getValue:

IWorkItem.getValue(IAttribute);


I can set the value properly and it shows up in the UI but in the next pass when I try to retrieve it I get a null value.

One answer



permanent link
Patrick Streule (4.9k21) | answered Jun 20 '08, 5:33 a.m.
JAZZ DEVELOPER
I'm having some trouble retrieving the value of a custom attribute
from an IWorkItem. Is there anything special I should be doing other
than calling getValue:

IWorkItem.getValue(IAttribute);

I can set the value properly and it shows up in the UI but in the next
pass when I try to retrieve it I get a null value.


That's the right way of retrieving the custom attribute value.

Two things you might want to check:

a) Make sure that both the IWorkItem and the IAttribute have the same
project area origin.

b) Make sure that the item profile used to retrieve the work item is
large enough. To access the custom attributes, the profile needs all
properties of IWorkItem.CUSTOM_ATTRIBUTE_PROPERTIES


HTH,
Patrick
Jazz 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.