Skip to main content

Preventing moving work items to done while a checklist is not completed

To block moving a work item to Done (or Closed, or another state) until a checklist is finished, use Azure DevOps work item rules together with a Complete field mapped by the extension (Premium).

Why rules need mapped fields​

Work item rules run against fields on the work item. The checklist UI alone is not a first-class rule target in Azure DevOps process rules. The extension syncs completion to a Single line text field (Yes when complete, empty when not) when you configure a Complete field mapping (Premium).

Until Progress and Complete are mapped and present on the form, the extension surfaces guidance that rules cannot enforce checklist completion until you finish field setup in Working with templates.

The template editor is where the Complete field mapping is configured before Azure DevOps rules can use it:

Template editor showing work item types and field mappings

Typical pattern​

  1. Create or pick a Single line text field (for example Checklist complete or your process equivalent).
  2. Map it as the Complete field for the template in Checklist Templates.
  3. In Organization settings → Process (or inherited process), add a rule on the work item type:
    • When state changes to Closed / Done (or your terminal state),
    • And the Complete field is empty (for example with Make required),
    • Then prevent the transition (or show validation), depending on what Azure DevOps Server/Services supports for your process version.

Exact rule authoring differs between Inherited and Hosted XML processes. Refer to Microsoft’s work item rules documentation for your version.

Inherited process rule editor showing a state-change rule that checks the checklist Complete field before allowing a move to Done or Closed.

Limit the rule to teams that use a checklist​

Process rules apply to every work item of that type. Area Path cannot be used as the condition. Scope your templates with Available teams, and with Visible in projects where needed, so only the teams that use the checklist match.

Do not give the Complete field a default value. If it already has a default of Yes, remove it. Azure DevOps puts the default back into the field, so the rule would never block.

Write the rule as Make required on the Complete field, or block the transition when the field is empty. Do not block on "not equal to Yes". Work items without a checklist get N/A, and that condition would block them.

On each template whose Complete field has a process rule, turn on Set the Complete field to N/A on work items this template does not apply to. Opening a work item updates Complete only for templates with that option on. Until you turn it on, opening a work item does not change the field. Checking, skipping, adding, removing, reordering, or resetting items still updates Complete.

When the option is on and the work item form opens, the extension sets Complete as follows:

  • A template applies to this work item and has the option on. The field is empty while any item that is not skipped is still unchecked. It is Yes when every such item is checked, when every item is skipped, or when the checklist has no items.
  • No template applies to this work item, but a template scoped to another team or project maps the same Complete field and has the option on. The field is set to N/A, so the rule does not block.
  • No template maps the field for this work item type, or none of those templates has the option on. The extension does not touch it.

The value is stored when someone saves the work item. Opening the form marks the work item unsaved when the field has to change. Later moves on the board or backlog use the stored value.

Side effect for teams without a checklist​

When a process has this rule but some projects or teams have no checklist, their work items start with an empty Complete field. The rule blocks them, including board drags and items created from the board, until someone opens the work item once and saves it. After that the field says N/A and the rule passes. That only happens when the option is on. The extension does not backfill existing work items.

Queries and pipelines​

Because completion is a normal field, you can also use queries or quality gates in pipelines that read the same field. See Customising cards with checklist progress & completion.