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

Enumeration List and Unassigned Literal

I currently have a precondition to require an attribute for a certain condition. This attribute is of type 'enumeration list'. Even though I have set a value in the enumeration for this attribute as the 'unassigned literal', it is still allowed to be set . Default literal doesn't seem to be used for 'enumeration list'

Any ideas on how I can stop the unassigned literal from being a valid option?

0 votes


Accepted answer

Permanent link
Thanks - my workaround was to archive the literal that we used for "default" and "unassigned" since when using an enumeration list these identities seem to do nothing
Ralph Schoon selected this answer as the correct answer

0 votes

Comments

Which avoids the fuzziness of the definition "required".


2 other answers

Permanent link
What kind of precondition is that? A JavaScript condition? A Server side Plugin?

What version of RTC?

Dependent on what you have, I would check what information an enumeration list attribute returns a list of enumeration literals so you can't test against "unassigned" you will have to test if the list is empty, if not you will have to check on multiple values. I assume your condition is not designed to handle enumeration lists and you will have to think about what "required" means in this context.

If this is JavaScript based, there might be a problem to actually access the enumeration list attribute. I had issues with list attribute values, as far as I can remember.

0 votes

Comments

Hi Ralph,

I have a simple javascript condition that checks if another attribute is blank. If this attribute is set then I want my enumeration list attribute to be mandatory. Unfortunately mandatory means users can still select the value that we have assigned to be the "Unassigned literal" (None) in this case.

This method works fine for regular single select enumeration (single select) attributes.

Version is 5.0.2

So what checks for mandatory and what does that mean in case of an enumeration list? If it is the required for condition precondition that ships with RTC, I would assume that - if it works at all for list attributes - that it checks for a literal has to be available, The "Unassigned literal" is a literal.

You might consider this a bug, if so approach support with a PMR, On the other hand, as I mention, what "required" means for a list type attribute is something completely different from a not list type attribute. You can argue about what should or should not be available for selection and how the condition should work, there might be good reasons for multiple different approaches.

i.e. for an enumeration list, default is blank. For type enumeration default is the default literal.


Permanent link

(sorry late to Contribute to this one)

Do you have to have Operational Behaviours - Attribute Validation on?

0 votes

Comments

I was using "required attributes for condition" only but I was advised that it is good practice to always have "Attribute Validation" as a precondition also

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
× 6,117

Question asked: Apr 08 '16, 7:46 a.m.

Question was seen: 2,824 times

Last updated: Apr 15 '16, 6:51 a.m.

Confirmation Cancel Confirm