26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

particular state; and when the work item is making a particular transition. Perform the<br />

following steps to add constraints:<br />

a. Click the Rules tab and then click New.<br />

b. In the Select a rule type dialog box, select a rule type. The most commonly<br />

used types are:<br />

i. AllowedValues – Use this rule type when you want to set a list of<br />

values that can be entered.<br />

ii. DefaultValue – Use this rule type when providing a starting value.<br />

iii. Required – Use this rule type when forcing the user to always supply<br />

a value.<br />

iv. ValidUser – Contains the name of a user on a project.<br />

The dialog box that appears allows you to set the rule’s parameters.<br />

c. Click OK twice to save the changes.<br />

4. After you have added a field to a work item, you need to decide where and how the<br />

field needs to displayed. Perform the following steps to add a field to your work item<br />

layout:<br />

a. On the Work Item Type page, click the Layout tab.<br />

b. On the Layout tab, select the location in the Layout tree where you want the<br />

new field to appear.<br />

c. In the left pane, right-click the selected node and then select New Control.<br />

d. Add an appropriate label and then in the FieldName property of the control,<br />

use the Ref Name that was added for the field in the above steps.<br />

e. Click Preview Form to verify that the new control is properly positioned on<br />

work item form.<br />

For example, you can add a new Security Impact field to the My Bug work item type you<br />

created previously, as follows:<br />

1. Click the Fields tab, and then click Add in the toolbar.<br />

2. In the Field Definition dialog box, enter the following information:<br />

a. Name – Security Impact<br />

b. Type – String<br />

c. RefName – MyBug.CustomField.1<br />

d. Help Text – Enter the security impact of this bug, from 1 – 5 where 1<br />

represents the lowest impact and 5 the highest.<br />

e. Reportable – Set the value as Dimension so that it is possible to create a<br />

report that will show which bugs have security impact.<br />

3. Click the Rules tab, and then click the Add button.<br />

4. In the Select a rule type dialog box, select the ALLOWEDVALUES option and<br />

then click OK.<br />

5. In the ALLOWEDVALUES dialog box, click Add button five times, each time<br />

adding a value from 1 to 5.<br />

6. Click OK.<br />

7. Click the Layout tab.<br />

8. Add the new field to the Status group as follows:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!