Joakim de Jong
Joakim de Jong

Reputation: 23

How can I create a custom rule when changing board column in Azure Devops Boards?

I am trying to create a custom rule so that a custom field must be defined when moving a card to a specific board column but can't find how to do it.

Something in the lines of: When board column changes value to "Deploy" make custom field "Target" required.

A user should not be able to move a card to column "Deploy" whithout field "Target" being defined.

Any suggestions?

There is a similar question but the only answer to that is using state changes isn't applicable for this particular column change.

Upvotes: 1

Views: 3008

Answers (2)

Levi Lu-MSFT
Levi Lu-MSFT

Reputation: 30343

The Board Column are not fields of work items as Shamrai mentioned. I am afraid it cannot be done by using the column Name.

The workaround is to map the columns to different states. And then add custom rule by using the workitem state changes.

Click the Gear icon on the Boards page, Navigate to Columns. See below:

enter image description here

You can add Custom State for User Story,Feature and Epic, if there are not enough states to map with the columns.

Go to Organization Settings--> Process under Boards-->Select the inherited process the your project using-->Click User Story(or Feature and Epic)-->Navigate to State and Add new State.

enter image description here

Now you can create the custom rule to make the Target field required when the state of the work item is changed (moved to a different column).

Upvotes: 2

Shamrai Aleksander
Shamrai Aleksander

Reputation: 16093

That`s a problem because Board Column, Board Lane, and Board Column Done fields are not available in the fields list to assign rules. I think you may try the following:

  1. Add custom state "Deploy" and assign it to your column. Then use rules.
  2. Create a custom application that queries Deploy without Target and returns such work items with comments "where is your target?" How can I find all work items in a given board column via Azure DevOps API? , How to update the work item from Powershell For VSTS?

Upvotes: 0

Related Questions