Edit

Share via


Add a rule to a work item type (Inheritance process)

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

Custom rules provide support for several business use cases. You can 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.

Important

The Inheritance process model is available for projects that are configured to support the model type. If you use 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 Organization-level process customization.

With a custom rule, you can define 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, make Risk a required field
  • When a change is made to the value of Release, clear the value of Milestone
  • When a change was made to the value of Remaining Work, make Completed Work a required field
  • When the value of Approved is True, 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, make Priority required
  • When current user isn't a member of Project Administrators, hide the Priority field

Note

You make a field required and specify a field default through the Options tab for the field.

Before you define a custom rule, review Inherited process rule composition. For examples that illustrate common scenarios for applying rules, see Sample custom rule scenarios.

Prerequisites

For guidance on tailoring Azure Boards to align with your specific business requirements, see Configure and customize Azure Boards.

Category Requirements
Permissions - To create, delete, or edit a process: Member of the Project Collection Administrators group or specific collection-level permissions Create process, Delete process, Edit process, or Delete a field from organization set to Allow. For more information, see Customize an inherited process.
- To update boards: Team Administrator or a member of the Project Administrators group.
Access - Even if you have Basic or lower access, you can still change a process if someone gives you permission.
- To update and change the type of your existing work items: Member of the project.
Project process model - Have the Inheritance process model for the project collection containing the project.
- To migrate data to Azure DevOps Services, use the Team Foundation Server Database Import Service.
Knowledge - Familiarity with the customization and process models.

Open organization process settings

  1. Sign in to your organization (https://dev.azure.com/{yourorganization}).

  2. Select Organization settings.

    Screenshot showing Organization settings button for selection.

  3. Select Process.

    Screenshot showing highlighted Process button for selection.

  1. Sign in to your collection (https://dev.azure.com/{Your_Collection}).

  2. Select Collection Settings or Admin settings.

  3. Select Process.

    Screenshot showing highlighted Process button in Collection settings.

Note

When you customize an inherited process, any projects that use the process automatically reflect the customizations. To ensure a smooth transition, we recommend that you create a test process and project to test your customizations before you implement them organization-wide. For more information, see Create and manage inherited processes.

Add a custom rule

Add fields to a selected work item type.

  1. Select the work item type (WIT) to which you want to add a rule, choose Rules, and then choose New rule.

    Screenshot shows the My Agile Process user story with the Rules tab open ready to create a rule.

    If you can't fill out the New work item rule dialog, you don't have the necessary permissions to edit the process. See Customize an inherited process.

  2. Name the rule and select the conditions and actions.

    Tip

    Specify a name that builds off the fields you're acting on, or the conditions you're setting.

    This example specifies that the Acceptance Criteria field is required when the State changes to Active and it's currently empty.

    Screenshot shows the New work rule form where you specify the rule content.

    The sequence of actions you specify doesn't affect the behavior of the rule itself or its behavior with respect to other rules defined for the same WIT.

  3. After you add a custom rule, open a work item. 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.

Screenshot shows the option to delete or disable a rule.

Note

You can review changes made to an inherited process by using the audit log and auditing features. For more information, see Access, export, and filter audit logs.