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/organizations/settings/work/rule-samples.md
+4-3
Original file line number
Diff line number
Diff line change
@@ -87,10 +87,10 @@ For the [On-premises XML process model](../../../reference/on-premises-xml-proce
87
87
- Restrict who can create or modify a work item
88
88
- Restrict who can create specific work item types, such as Epics or Features
89
89
90
-
For example, you can restrict modification of work items by adding a rule to the work item type, usually within the **WORKFLOW** section. To learn more, see [Rules and rule evaluation, User or group membership rule restrictions](rule-reference.md#apply-ignore).
90
+
For example, you can restrict modification of work items by adding a rule to the work item type, usually within the **WORKFLOW** section.
91
91
92
-
You restrict access to work tracking objects in one of two ways:
93
-
-[Set a condition field rule](../settings/work/rule-reference.md), [a condition-based field rule](../../../reference/xml/assign-conditional-based-values-and-rules.md) or a combination of the two that applies to a group. You can restrict changes from being made to a field by specifying a qualifying rule and making it apply for a specific group. Conditional rules can include **CANNOTLOSEVALUE**, **EMPTY**, **FROZEN**, **NOTSAMEAS**, **READONLY**, and **REQUIRED** elements.
92
+
You restrict access to work tracking objects in one of two ways:
93
+
-[Set a condition field rule](rule-reference.md), [a condition-based field rule](../../../reference/xml/assign-conditional-based-values-and-rules.md) or a combination of the two that applies to a group. You can restrict changes from being made to a field by specifying a qualifying rule and making it apply for a specific group. Conditional rules can include **CANNOTLOSEVALUE**, **EMPTY**, **FROZEN**, **NOTSAMEAS**, **READONLY**, and **REQUIRED** elements.
94
94
- By [adding WITs to the Hidden Categories group](../../../reference/xml/use-categories-to-group-work-item-types.md), you can prevent the majority of project contributors from creating them. You [can create a hyperlink to a template](../../../boards/backlogs/work-item-template.md) that opens the work item form and share that link with those team members who you do want to create them.
Copy file name to clipboardExpand all lines: docs/reference/xml/assign-conditional-based-values-and-rules.md
+17-7
Original file line number
Diff line number
Diff line change
@@ -36,8 +36,10 @@ Field conditions are additional elements that you list inside a `FIELD` (Definit
36
36
> The value attribute is case-insensitive. Therefore, if the field reference name holds "YYY", matches include the values "yyy" and "YYY".
37
37
38
38
<aname="Syntax"></a>
39
+
39
40
## Syntax structure for conditional elements
40
-
The following table describes conditional rules that you can specify as child elements of the `FIELD` (Definition) element or `FIELD` (Workflow) element. These elements accept one or more of the following attributes:
41
+
42
+
The following table describes conditional rules that you can specify as child elements of the `FIELD` (Definition) element or `FIELD` (Workflow) element. These elements accept one or more of the following attributes:
41
43
42
44
- `field`: A string that describes the field. Must contain 1 to 255 characters.
43
45
- `value`: When the specified field has this value, the rules in the `WHEN` and `WHENNOT` elements are applied to the current field.
@@ -151,8 +153,10 @@ Field conditions are additional elements that you list inside a `FIELD` (Definit
151
153
152
154
153
155
<aname="DependentRequired"></a>
156
+
154
157
## Define a dependent required field
155
-
You can specify that a field is required only when another field contains a specific value. In the following example, when a customer reports a bug, a customer severity must be specified. If the bug was not reported by a customer, a customer severity is not required.
158
+
159
+
You can specify that a field is required only when another field contains a specific value. In the following example, when a customer reports a bug, a customer severity must be specified. If the bug was not reported by a customer, a customer severity is not required.
156
160
157
161
> [!div class="tabbedCodeSnippets"]
158
162
> ```XML
@@ -173,7 +177,8 @@ Field conditions are additional elements that you list inside a `FIELD` (Definit
173
177
<aname="DependentPickList"></a>
174
178
175
179
## Define a conditional pick list
176
-
The following example demonstrates a conditional pick list in which the allowed values for the Problem Type field are limited, based on whether the value of the ProblemCharacteristic field is set to Documentation.
180
+
181
+
The following example demonstrates a conditional pick list in which the allowed values for the Problem Type field are limited, based on whether the value of the ProblemCharacteristic field is set to Documentation.
177
182
178
183
> [!div class="tabbedCodeSnippets"]
179
184
> ```XML
@@ -189,8 +194,10 @@ Field conditions are additional elements that you list inside a `FIELD` (Definit
189
194
> ```
190
195
191
196
<aname="WhenChanged"></a>
197
+
192
198
## Define a field when the user changes another field (WHENCHANGED)
193
-
In the following example, when a user changes the value of the MyCorp.State field, the MyCorp.StateDate field is set to the current date and time, as the server clock shows.
199
+
200
+
In the following example, when a user changes the value of the MyCorp.State field, the MyCorp.StateDate field is set to the current date and time, as the server clock shows.
194
201
195
202
> [!div class="tabbedCodeSnippets"]
196
203
> ```XML
@@ -213,9 +220,12 @@ Field conditions are additional elements that you list inside a `FIELD` (Definit
213
220
> </FIELD>
214
221
> ```
215
222
> <aname="WhenNotChanged"></a>
216
-
> ## Define a field value based on a user not modifying a field (WHENNOTCHANGED)
217
-
> In the following example, when a user does not change the value of the MyCorp.State field, the MyCorp.StateDate field becomes read-only.
218
-
>
223
+
224
+
## Define a field value based on a user not modifying a field (WHENNOTCHANGED)
225
+
226
+
In the following example, when a user does not change the value of the MyCorp.State field, the MyCorp.StateDate field becomes read-only.
227
+
228
+
219
229
> [!div class="tabbedCodeSnippets"]
220
230
> ```XML
221
231
> <FIELDrefname="MyCorp.StateDate"name="Date Of Last State Change"type="DateTime">
Copy file name to clipboardExpand all lines: docs/reference/xml/change-workflow-wit.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -247,7 +247,9 @@ You can define rules that update fields whenever the following events occur:
247
247
The following examples show some of the rules that are applied to system fields in the process template for MSF Agile Software Development.
248
248
249
249
<aname="DefineField"></a>
250
+
250
251
### Change the value of a field when the state changes
252
+
251
253
When the value of the **State** field for a work item is set to Active and the work item is saved, the values of the **Activated By** and **Assigned To** fields are automatically set to the name of the current user. That user must be a member of the Team Foundation Server Valid Users group. The value of the **Activated Date** field is also set automatically. The following example shows the elements that enforce this rule:
252
254
253
255
```xml
@@ -269,8 +271,10 @@ You can define rules that update fields whenever the following events occur:
269
271
```
270
272
271
273
<aname="ClearField"></a>
274
+
272
275
### Clear the value of a field when the value of another field changes
273
-
When the value of the **State** field for a work item is set to Active and the work item is saved, the Closed Date and Closed By fields are automatically set to null and made read-only if you use the `EMPTY` element, as the following example shows.
276
+
277
+
When the value of the **State** field for a work item is set to Active and the work item is saved, the Closed Date and Closed By fields are automatically set to null and made read-only if you use the `EMPTY` element, as the following example shows.
0 commit comments