You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/add-modify-field.md
+33-37Lines changed: 33 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,9 @@ You can modify existing fields or add custom fields to track more data. For exam
25
25
26
26
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.
27
27
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)|
31
31
32
32
## Prerequisites
33
33
@@ -65,7 +65,7 @@ To change a field attribute or rename a field, use the **witadmin** command line
65
65
66
66
<aid="edit"> </a>
67
67
68
-
## To edit a WIT definition file
68
+
## Edit a WIT definition file
69
69
70
70
To add rules or add a custom field, export, edit, and then import the WIT definition file.
71
71
@@ -100,27 +100,23 @@ The field appears as a checkbox on the form.
100
100
101
101
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.
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.
126
122
@@ -143,22 +139,22 @@ For example, the following code snippet enforces a rule that only members of the
143
139
144
140
You can apply rules to fields to achieve the following actions:
145
141
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**|
154
150
155
151
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.
156
152
157
153
For details on field rules and restrictions, see [Rules and rule evaluation](../organizations/settings/work/rule-reference.md).
158
154
159
155
<aid="add-custom-field"> </a>
160
156
161
-
## To add a custom field
157
+
## Add a custom field
162
158
163
159
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.
164
160
@@ -218,7 +214,7 @@ To add a custom field, edit the WIT definition to add a **FIELD** element within
218
214
219
215
<aid="change-label"> </a>
220
216
221
-
## To change the field label on a work item form
217
+
## Change the field label on a work item form
222
218
223
219
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.
224
220
@@ -262,10 +258,10 @@ To add a custom control to the new web form, see [WebLayout and Control elements
262
258
263
259
## Change an attribute of an existing field
264
260
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.
0 commit comments