Welcome to the Jazz Community Forum
multi-select enumerations

Is there anyway to get an IEnumeration directly without having an attribute of that enumeration type (Not calling resolveEnumeration) in the Java API?
Basically, what I have is an attribute on a work item that should be a multi select attribute. To set this up I created an attribute of type string, and added a presentation editor that attaches an enumeration to the custom attribute.
When multiple values of the enumeration are selected, the string value of the custom work item is something like "test.multiselect.enumeration.l1,test.multiselect.enumeration.l2" and I need a way of first knowing that this custom attribute of type string is actually a multi select, and second translating the values of the enumeration literals to the display names.
Thanks for any help,
-ryan
Basically, what I have is an attribute on a work item that should be a multi select attribute. To set this up I created an attribute of type string, and added a presentation editor that attaches an enumeration to the custom attribute.
When multiple values of the enumeration are selected, the string value of the custom work item is something like "test.multiselect.enumeration.l1,test.multiselect.enumeration.l2" and I need a way of first knowing that this custom attribute of type string is actually a multi select, and second translating the values of the enumeration literals to the display names.
Thanks for any help,
-ryan
2 answers

well, and enumeration is an ordered array of values. always..
in some uses of the values of the enumeration could be a single or multi-select field.. but the enumeration itself is not multi-anything.. just an ordered array of values.
so, the field defines what to do.. can we see the field definition?
you can get the literals of an enumeration from the enumeration.
I would guess that l1 is literal 1, l2 is literal 2, etc..
If u get them all, then u would know how many values there were and could match..
enumeration.getEnumerationLiterals(false)l returns only the current active values. in a List<>
but I'd still like to see this string variable, with a multiselect list UI.
Sam
in some uses of the values of the enumeration could be a single or multi-select field.. but the enumeration itself is not multi-anything.. just an ordered array of values.
so, the field defines what to do.. can we see the field definition?
you can get the literals of an enumeration from the enumeration.
I would guess that l1 is literal 1, l2 is literal 2, etc..
If u get them all, then u would know how many values there were and could match..
enumeration.getEnumerationLiterals(false)l returns only the current active values. in a List<>
but I'd still like to see this string variable, with a multiselect list UI.
Sam

Right, I understand that the enumeration is just an array of values.
The problem is I can't get a handle on the IEnumeration associated with my attribute, because the attribute is of type String.
If I setup the custom attribute to have type enumeration, then that attribute can only hold one literal from the enumeration.
To make the custom attribute, I made it of type string, and then added UI presentation to make editing that attribute use the backing enumeration as a multi-select checkbox list.
Is there anyway to get a handle on the IEnumeration that I can call getEnumerationLiterals on if I only know the enumeration's ID?
The problem is I can't get a handle on the IEnumeration associated with my attribute, because the attribute is of type String.
If I setup the custom attribute to have type enumeration, then that attribute can only hold one literal from the enumeration.
To make the custom attribute, I made it of type string, and then added UI presentation to make editing that attribute use the backing enumeration as a multi-select checkbox list.
Is there anyway to get a handle on the IEnumeration that I can call getEnumerationLiterals on if I only know the enumeration's ID?