Retrieving IWorkItem custom attribute value
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:
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.
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
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