An enumeration is work item attribute type that describes
a list of values. For example, in the Scrum process, the Priority
and Severity attributes are enumerations. You can use enumerations
to define new attributes, and you can add and modify values for existing
attributes.
About this task
Enumerations consist of a set of literals
in a specific order. These values, called "literals," serve as the
available values when the enumeration is displayed in the work item
editor. You must designate one literal as the default literal, which
is set by default when a user creates a work item.
You can use
the same enumeration in multiple custom attributes. For example, an
enumeration named priority has these literals: Unassigned, Low, Medium,
and High. The default literal is set to Unassigned. The Defect work
item type has an associated attribute named Priority that uses this
enumeration. When a user creates a Defect work item, the Priority field
is displayed with Unassigned selected by default.
Procedure
To define an enumeration using the Eclipse client:
- Open the Enumerations page:
- In the Team Artifacts view of the Work Items perspective,
right-click the project area and select Open.
- Click the Process Configuration tab.
- Expand , then click Enumerations.
- Select the enumeration that you want to edit, or click Add in
the Choose the Enumeration to edit field to
define a new enumeration. After the enumeration is selected, in the
Enumeration section, click Add to add a literal
to the enumeration.
Note: When you define a new enumeration,
you can store it in the process specification or the database. If
you store the enumeration in the database, you can add new values
to the enumeration directly from the work item editor, even if you
do not have permissions to modify the process specification. You still
require permissions to add new values.
- In the Add Literal window, enter a
name for the value. Select an icon from the list or click Add
Icons and navigate to a graphics file to use as the icon
for that literal. Click OK.
- To adjust the order in which the values are displayed in
the work item editor, click Move Up and Move
Down.
- After you have created one or more literals, in the Default
literal field, select one literal to be the default.
- To make an enumeration attribute a required field, define
an Unassigned literal and select this literal in the Unassigned
Literal field. See Defining required and implied attributes.
- When you finish adding and editing enumeration literals,
click Save to save your changes.