2

I'm new using Azure DevOps Server and i having some problems creating rules. I'm trying to make a rule that doesn't allow the user to change the state of a Feature on the Board if this Feature doesn't have any attachment on it.

The rule i created is something like this: Test Rule . Right now with this rule it still permits the user to change state.

I practiced with other rules where i made required to have a description on state change and it worked fine not allowing the user to change state and showing "error" on the board.

I was testing with the querys if the feature I was using had any files attached but the result showed the work item correctly when i used that "Attached File Count" = 0.

If someone had some issue similar to this and can help me with it I'll apprecite it very much.

  • Hi,@Franco Maieli How is your problem progressing?Do you try the solution given by me?If you have any question,please kindly let me know. – Hugh Lin Oct 28 '19 at 10:34
  • Hi @HughLin-MSFT, sorry for not answering before. Your solution worked very well, thank you for your help. – Franco Maieli Oct 28 '19 at 17:37

1 Answers1

4

The reason your rule setting doesn't work is that the default value of the Attached File Count is 0, so the Make required Attached File Count set in your Actions is not valid.

As a workaround ,you can achieve it through the following setting:

First, you can create a new field in the Feature item, as shown below.

enter image description here

Then we need to new two rules :

enter image description here

enter image description here

If you don't want the needAttachment field to be displayed in the work item page to prevent being manually modified, you can choose Hide from layout option.

enter image description here

After setting, when someone want to modify the state, if there is no attachment, he will get an error.

enter image description here

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25