It's all about the answers!

Ask a question

Enumeration - Default Literal


Karen Steele (1.2k2135139) | asked Mar 02 '12, 9:50 a.m.
With RTC 3.0x and higher, it has become a mandatory requirement to assign a default literal value.

is there a way around this ? It negates the ability to set an enumeration as mandatory on a specific state or state change as the "default" is already set and therefore populated.

Did I miss something ?

Accepted answer


permanent link
Jared Burns (4.5k29) | answered Mar 14 '12, 12:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
With RTC 3.0x and higher, it has become a mandatory requirement to assign a default literal value.

is there a way around this ? It negates the ability to set an enumeration as mandatory on a specific state or state change as the "default" is already set and therefore populated.

Did I miss something ?


If you want the user to have to choose some value other than what is initially selected in the editor, you should set the Unassigned Literal to be the same as your Default Value.

This value will then be selected by default, but the attribute will still be considered unset.

Hope that helps,
- Jared
Jared Burns selected this answer as the correct answer

Comments
Anne Catherine Vosler commented Mar 15 '12, 4:50 p.m. | edited Feb 21 '14, 3:05 p.m.

Jburns,

I've attempted setting the Default Literal and the Unassigned Literal to the same value, but when I create a new defect (the work item that has the field for which I'm applying this enumeration), this field does not have to be reset in order to save. In addition, defects that have been updated with this attribute change also don't need to have this field reset in order to save other changes. It seems we're still in the same predicament - is there any additional guidance you can provide?

Thanks!



With RTC 3.0x and higher, it has become a mandatory requirement to assign a default literal value.


is there a way around this ? It negates the ability to set an enumeration as mandatory on a specific state or state change as the "default" is already set and therefore populated.

Did I miss something ?


If you want the user to have to choose some value other than what is initially selected in the editor, you should set the Unassigned Literal to be the same as your Default Value.

This value will then be selected by default, but the attribute will still be considered unset.

Hope that helps,
- Jared


Jared Burns commented Feb 21 '14, 3:06 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I just got pinged about this question and saw this response for the first time. The final part of the puzzle is that you need to configure a precondition on Work Item Save that requires the attribute to be set.


That precondition won't consider the attribute to be "set" if it matches your selection for the Unassigned Literal. 


John Nason commented Feb 21 '14, 3:59 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

I was the "pinger" and the combination of Default Literal = Unassigned, plus the "Required Attributes" precondition got me exactly what I want - a non-meaningful default that comes up when the workitem is created that the submitter then needs to change before saving.

I hadn't put 2+2 together on what "Unassigned Literal" meant but that's exactly what it is - a value that effectively plays like "empty" or unassigned while still having a textual display you can customize.
I like!

2 other answers



permanent link
Michael Bunnell (6821819) | answered Mar 13 '12, 1:36 p.m.
Karen - I actually found a way around this. You cannot save it from the GUI side, but you can go into the Process Configuration Source and change it there.

Do a search for your enumeration in the source, the one with all the values. There will be one listed with default="true". Just change the True to False and it comes up blank, and gives the user an error if they don't change anything.

permanent link
Michael Bunnell (6821819) | answered Mar 13 '12, 1:05 p.m.
Great question Karen. I was just looking into this myself, as the client does not want Unassigned to be a valid value. But, if we cannot change the default literal to none, most users will just keep the Unassigned value (or whatever the default one is). Hopefully someone can answer this for us.

Your answer


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