Add a rule to a work item type (Inheritance process)
Raksts
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
Custom rules provide support for a number of business use cases, allowing you to go beyond setting a default value for a field or make it required. Rules allow you to clear the value of a field, copy a value into a field, and apply values based on dependencies between different fields' values.
Svarīgi
The Inheritance process model is available for projects configured to support it. If you’re using an older collection, check the process model compatibility. If your on-premises collection is configured to use the on-premises XML process model, you can only use that process model to customize the work tracking experience. For more information, see Choose the process model for your project collection.
With a custom rule, you can define a number of actions based on specific conditions. For example, you can apply a rule to support these types of scenarios:
When a value is defined for Priority, then make Risk a required field
When a change is made to the value of Release, then clear the value of "Milestone"
When a change was made to the value of Remaining Work, then make Completed Work a required field
When the value of Approved is True, then make Approved By a required field
When a user story is created, make the following fields required: Priority, Risk, and Effort
When current user is a member of "Project Administrators", then make Priority required
When current user is not a member of "Project Administrators", then hide the Priority field
- Even if you have Basic or lower access, you can still change a process if someone gives you permissions to do so. - To update and change the type of your existing work items: Member of the project.
Sign in to your organization (https://dev.azure.com/{yourorganization}).
Select Organization settings.
Select Process.
Sign in to your collection (https://dev.azure.com/{Your_Collection}).
Select Collection Settings or Admin settings.
Select Process.
Piezīme
When you customize an inherited process, any projects using that process automatically reflect the customizations. To ensure a smooth transition, we recommend creating a test process and project, which allows you to test your customizations before you implement them organization-wide. For more information, see Create and manage inherited processes.
Add a custom rule
You add fields to a selected work item type.
Select the WIT to which you want to add a rule, choose Rules, and then choose New rule.
Name the rule and select the condition(s) and action(s) from the dropdown menus.
Padoms
Specify a name that builds off the field(s) you're acting on, or the conditions you're setting.
Here we define that the Acceptance Criteria field is required when the State changes to Active and it is currently empty.
The sequence of actions you specify doesn't impact the behavior of the rule itself or its behavior with respect to other rules defined for the same WIT.
Once you've added a custom rule, open a work item and verify that the rule works as you intended.
Delete or disable a rule
You can temporarily disable a rule or delete it altogether.
You delete or disable the rule from the actions menu of the rule.
Pievienojieties meetup sērijai, lai kopā ar citiem izstrādātājiem un ekspertiem izveidotu mērogojamus AI risinājumus, kuru pamatā ir reālas lietošanas gadījumi.
The ability to build business rules that ensure consistent business logic whatever app is accessing that data set is imperative to a successful business operation. This module will show you how you can build business rules that are triggered anytime they're used within Dataverse.