You can configure a value set customization so that the
values of one enumeration type attribute are set based on the value
of another enumeration type attribute.
About this task
This task uses the Dependent Enumerations value
set provider to populate the list of values for one attribute based
on the value of another attribute. Both attributes are of the enumeration
type. In this example, the set of values for the Browser attribute
are set based on the value of the OS attribute.
Procedure
- Open the Attribute Customization 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 , and then click Attribute Customization.
- Select Value Sets, then click Add.
Enter a name that describes the customization. Select Dependent
Enumerations from the Provider drop-down list. Click OK.
- In the Configuration section, select the source attribute
and the dependent enumeration. Click a value in the Source Attribute
column, then select the corresponding value or values in the Dependent
Enumeration column. For example, in the following figure, the dependent
enumeration, Browser, gets its values from the source attribute, Operating
system. When the OS X 10.6 Operating System value is selected, the
Browser attribute is populated with Firefox 3.6, Safari 5, and Chrome
values.
- Click Attributes and Types. Select
the work item type, such as Defect or Task. Scroll to the Attributes section.
Click Add. Create a custom attribute for Operating
system. In the Type field, select Operating system (Enumeration).
Click OK to save the new attribute. Click Add to
create a custom attribute for Browser. Select Browser (Enumeration)
in the Type field. In the Value Set field, select Browser, the Dependent
Enumeration customization that you created. Click
, the Add Dependency icon, then select
the source attribute, Operating system. Click OK.
- Click Editor Presentations. Select
the editor presentation to which you want to add fields for the two
new attributes. Select the tab and then section to which you want
to add the fields. For example, the Details section
on the Overview tab. With the section selected,
click Add Presentation to add fields for the
new attributes.
- Click Save to save your changes
to the project area.
Results
When users create work items, the values listed in the Browser field are set based on the
value of the Operating system field. Note: The Dependent Enumerations value set provider does not
populate the dependent enumeration list in plan views. All enumeration values are
shown.