I believe I have managed to work this out myself - just add the following:
Not(($Priority > 0) && ($Priority < 11))
So a basic logic error - please do try this out if you find it useful...
Hi, I am trying to create a validation rule at the Work Item level that restricts the value in the Priority field to be between 1 and 10 or any other integer value range. I have input the following to Settings->Configure->Work Item->Validation Rules: Rule Name: PriorityValidation Rule is enabled. This would seem correct to me but it will still allow me to enter values like 11 and 0. If I enter a value like 5 then it errors and sends me the error message I have input to the rule. Screenshot attached. If anyone can assist that would be greatly appreciated. Many thanks |
Please sign in to leave a comment.
I believe I have managed to work this out myself - just add the following:
Not(($Priority > 0) && ($Priority < 11))
So a basic logic error - please do try this out if you find it useful...
Hi Andrew,
You got it correctly! In order to validation rule to comply you need to pass the evaluation criteria (IF Eval=TRUE). In addition as best practice you want the validation rule would fire only when it's need to for performance optimization and therefore I would add the evaluation criteria - (isChanged($Priority) || isNew())
Good luck!
Tamir