Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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.


0 votes


Accepted answer

Permanent link
as mentioned over in
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
Meera Varma selected this answer as the correct answer

1 vote

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)


One other answer

Permanent link
Thanks a lot for the help. Much appreciated. We have been stuck on this for a while. This has helped us progress :)

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Jan 24 '13, 12:46 p.m.

Question was seen: 4,226 times

Last updated: Jan 25 '13, 12:05 p.m.

Confirmation Cancel Confirm