It's all about the answers!

Ask a question

how to resolve enumeration for RTC 3.x version multiselect attribute

Meera Varma (911012) | asked Jan 24 '13, 12:46 p.m.
In case of RTC 3.x the multiselect is created as string with enumeration as key in presentation.When trying to attribute value(server side extension), we are unable to resolve the enumeration.

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

permanent link
sam detweiler (12.5k6194201) | answered Jan 24 '13, 1:46 p.m.
edited Jan 24 '13, 1:47 p.m.
as mentioned over in
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.

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
Meera Varma selected this answer as the correct answer

sam detweiler commented Jan 25 '13, 12:20 a.m.

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

sam detweiler commented Jan 25 '13, 9:28 a.m.

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)

One other answer

permanent link
Meera Varma (911012) | answered Jan 25 '13, 12:05 p.m.
Thanks a lot for the help. Much appreciated. We have been stuck on this for a while. This has helped us progress :)

Your answer

Register or to post your answer.