It's all about the answers!

Ask a question

Unable to setValue of custom Enumeration attributes

Bharat Malge (2131830) | asked May 17 '16, 8:58 a.m.

I am trying to map the attributes of work item to another project area work item but unable to set the literals of enumeration from one project area attribute to another.
While doing this I can able to get the literal values and and when I call copyEnumerationAttribute method
it set the value by setValue(targetWorkItem, targetAttribute, value);
But the values is not reflecting in the targetWorkItem.

Thanks In Advance

One answer

permanent link
Ralph Schoon (63.3k33646) | answered May 17 '16, 9:05 a.m.
 You can not necessarily use the literals across project areas. they only live within their project area. You would have to use a mapping and e.g. look up the literal from the display value. You should actually see exceptions if you set the wrong literals.

I am not aware of a copyEnumerationAttribute() method in the API, but that does not mean t does not exist.

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.