how to resolve enumeration for RTC 3.x version multiselect attribute
In case of proper enumeration IWorkItemServer.resolveEnumeration(IAttribute, IProgressMonitor) would work however for a string type the above will throw assertion error.
Is there a way to resolve enumeration of multiselect attribute.
Accepted answer
https://jazz.net/forum/questions/97797/how-to-retrieve-enumeration-values-from-a-multi-select-field
there is currently not a sample that demonstrates a (or the proper) way to discover and enumerate the selected values for a string stored multi-select enumeration.
I have supplied a sample of how to detect and manage workitem attributes dynamically, and I will update my sample.
https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes
I don't work for IBM, and this is not my primary job, so it may be a while til I can get to it
of course, as this is a collaborative site, anyone is welcome to take a sample and extend it, sharing back to the community
Comments
I've updated my sample referenced above, with the code to get the enumeration values for the literals in a string hosted multi-select listbox attribute.
the net of this is to find the string attribute in the process config xml presentation space as a list type.
if not found, it just a list type
if found, knowing its a list type, then get the enumeration name. from the process source too.
once u have that things are easy.
the code SHOULD only get the XML source from the project process configĀ ONCE per run vs once per string attribute type.. but I leave that to the user.
this now handles all three enumeration types
single select
multiple select before V4
and multi-select v4 and above.
one of our migrated projects has both V3 and V4 type multi-select at the same time.. and it handles both
I can't edit my prior comment..
I reposted by sample
I cleaned up a couple things.. make the v3 & v4 multi-list messages look the same,
moved the xml retrieve outside the attribute loop
fixed the literal loop when NO selections were made (ie the field was empty)