Skip to content

Commit da29c6d

Browse files
committed
outdenting
1 parent d31f494 commit da29c6d

File tree

1 file changed

+33
-37
lines changed

1 file changed

+33
-37
lines changed

docs/reference/add-modify-field.md

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ You can modify existing fields or add custom fields to track more data. For exam
2525

2626
Pick lists get defined in different ways, such as through the user interface, WIT workflows, or by adding user accounts to a project, as shown in the following table.
2727

28-
> |WIT definition |Command line change (On-premises XML process) |
29-
> |-------------|----------|
30-
> |- [Customize a pick list](#picklist)<br/>- [Add rules to a field](#add-rules)<br/>- [Add a custom field](#add-custom-field)<br/>- [Change the field label on the form](#change-label)<br/>- [Add a custom control](#custom-control) |- [List fields](../boards/work-items/work-item-fields.md#list-fields)<br/>- [Change a field attribute](#change-attribute) <br/>- [Delete a field](#delete-field)<br/>- [Index a field](#index-field) |
28+
|WIT definition |Command line change (On-premises XML process) |
29+
|-------------|----------|
30+
|- [Customize a pick list](#picklist)<br/>- [Add rules to a field](#add-rules)<br/>- [Add a custom field](#add-custom-field)<br/>- [Change the field label on the form](#change-label)<br/>- [Add a custom control](#custom-control) |- [List fields](../boards/work-items/work-item-fields.md#list-fields)<br/>- [Change a field attribute](#change-attribute) <br/>- [Delete a field](#delete-field)<br/>- [Index a field](#index-field) |
3131

3232
## Prerequisites
3333

@@ -65,7 +65,7 @@ To change a field attribute or rename a field, use the **witadmin** command line
6565

6666
<a id="edit"> </a>
6767

68-
## To edit a WIT definition file
68+
## Edit a WIT definition file
6969

7070
To add rules or add a custom field, export, edit, and then import the WIT definition file.
7171

@@ -100,27 +100,23 @@ The field appears as a checkbox on the form.
100100

101101
Pick lists are enumerated values displayed in drop-down menus on work item forms and in the **Value** column of the query editor. To customize a pick list for most string or integer fields, edit the WIT definition. For example, use the following XML to add a custom Resolution field with a pick list.
102102

103-
:::row:::
104-
:::column span="1":::
105-
Custom field and pick list
106-
![Custom pick list](media/custom-pick-list.png)
107-
:::column-end:::
108-
:::column span="2":::
109-
```
110-
<FIELD name="Resolution" refname="MyCompany.Resolution" type="String">
111-
<ALLOWEDVALUES>
112-
<LISTITEM value="By Design" />
113-
<LISTITEM value="Duplicate" />
114-
<LISTITEM value="External" />
115-
<LISTITEM value="Fixed" />
116-
<LISTITEM value="Not Repro" />
117-
<LISTITEM value="Postponed" />
118-
<LISTITEM value="Won't Fix" />
119-
</ALLOWEDVALUES>
120-
</FIELD>
121-
```
122-
:::column-end:::
123-
:::row-end:::
103+
Custom field and pick list
104+
![Screenshot shows a Custom pick list.](media/custom-pick-list.png)
105+
106+
107+
```XML
108+
<FIELD name="Resolution" refname="MyCompany.Resolution" type="String">
109+
<ALLOWEDVALUES>
110+
<LISTITEM value="By Design" />
111+
<LISTITEM value="Duplicate" />
112+
<LISTITEM value="External" />
113+
<LISTITEM value="Fixed" />
114+
<LISTITEM value="Not Repro" />
115+
<LISTITEM value="Postponed" />
116+
<LISTITEM value="Won't Fix" />
117+
</ALLOWEDVALUES>
118+
</FIELD>
119+
```
124120

125121
Rules allow you to combine lists, restrict who can access a list, and set conditions for when a list appears on the work item form. You can use the **expanditems** and **filteritems** attributes to control whether a distribution list shows individual members or filters specific items.
126122

@@ -143,22 +139,22 @@ For example, the following code snippet enforces a rule that only members of the
143139

144140
You can apply rules to fields to achieve the following actions:
145141

146-
> | Action | XML Element |
147-
> |---|---|
148-
> | Add a tool-tip to a field. | **HELPTEXT** |
149-
> | Define or restrict the values a field can have. | **CANNOTLOSEVALUE**, **EMPTY**, **FROZEN**, **NOTSAMEAS**, **READONLY**, **REQUIRED** |
150-
> | Copy a value or set a default value for a field. | **COPY**, **DEFAULT**, **SERVERDEFAULT** |
151-
> | Restrict who can modify a field. | **VALIDUSER**, **for**, **not** |
152-
> | Enforce pattern matching for string fields. | **MATCH** |
153-
> | Apply rules conditionally based on other field values. | **WHEN**, **WHENNOT**, **WHENCHANGED**, **WHENNOTCHANGED** |
142+
| Action | XML Element |
143+
|---|---|
144+
| Add a tool-tip to a field. | **HELPTEXT** |
145+
| Define or restrict the values a field can have. | **CANNOTLOSEVALUE**, **EMPTY**, **FROZEN**, **NOTSAMEAS**, **READONLY**, **REQUIRED** |
146+
| Copy a value or set a default value for a field. | **COPY**, **DEFAULT**, **SERVERDEFAULT** |
147+
| Restrict who can modify a field. | **VALIDUSER**, **for**, **not** |
148+
| Enforce pattern matching for string fields. | **MATCH** |
149+
| Apply rules conditionally based on other field values. | **WHEN**, **WHENNOT**, **WHENCHANGED**, **WHENNOTCHANGED** |
154150

155151
System fields, identified by the "System" prefix, for example, System.ID, allow limited rule customization. For instance, you can't copy or clear fields that track who created, changed, or closed a work item, or system-managed date-time fields.
156152

157153
For details on field rules and restrictions, see [Rules and rule evaluation](../organizations/settings/work/rule-reference.md).
158154

159155
<a id="add-custom-field"> </a>
160156

161-
## To add a custom field
157+
## Add a custom field
162158

163159
To add a custom field, edit the WIT definition to add a **FIELD** element within the **FIELDS** section and a **Control** element within the **FORM** section.
164160

@@ -218,7 +214,7 @@ To add a custom field, edit the WIT definition to add a **FIELD** element within
218214

219215
<a id="change-label"> </a>
220216

221-
## To change the field label on a work item form
217+
## Change the field label on a work item form
222218

223219
To modify the field label, change the value assigned to the ```Control``` element ```Label``` attribute. To remove a field from the work item form, delete the ```Control``` element associated with the field.
224220

@@ -262,10 +258,10 @@ To add a custom control to the new web form, see [WebLayout and Control elements
262258

263259
## Change an attribute of an existing field
264260

265-
You use **witadmin changefield** to change the attributes of an existing field. For example, the following command changes the friendly name defined for MyCompany.Type to Evaluation Method.
261+
You use **witadmin changefield** to change the attributes of an existing field. For example, the following command changes the friendly name defined for `MyCompany.Type` to Evaluation Method.
266262

267263
```
268-
witadmin changefield /collection:http://AdventureWorksServer:8080/tfs/DefaultCollection /n:MyCompany.Type /name:"Evaluation Method"
264+
witadmin changefield /collection:http://AdventureWorksServer:8080/ DefaultCollection/n:MyCompany.Type /name:"Evaluation Method"
269265
```
270266

271267
The following table summarizes the attributes you can change using [witadmin changefield](witadmin/manage-work-item-fields.md).

0 commit comments

Comments
 (0)