If field contains specific value, do not allow next step in workflow

Issue #562 resolved
Scott McDonald created an issue

Hello -

I feel like this can be handled via Validation rule, however I'm just not getting the results I need. I have a field NNN (dropdown) with multiple fields (Yes, Testing, No, QA Complete). I want to display a warning message if the values Yes or Testing are present on ticket, which in essence won't allow them to advance to the next step in the workflow.

Thank you, Scott

Comments (9)

  1. Scott McDonald reporter

    That worked! If I have 3 separate Multi-Select custom field with each one having the same values of Yes, Testing etc, is there a way to say "if any of those mult-select have the value of yes or testing selected, please fix the error before you move onto the next workflow step"?

  2. Fidel Castro Armario repo owner

    You should use the following boolean expression:

    "Yes" in %{aaaaa} OR "Testing" in %{aaaaa} OR
    "Yes" in %{bbbbb} OR "Testing" in %{bbbbb} OR
    "Yes" in %{ccccc} OR "Testing" in %{ccccc}
    

    where aaaaa, bbbbb and ccccc are field codes of the 3 Multi-Select custom fields.

  3. Scott McDonald reporter

    Here's what I've added and the validation is not working how I want it to work. If I have flip the value to Yes in 14210 and leave 14211 and 14212 in QA Accepted, it allows the ticket to go through.

    "Yes" in %{14210} OR "Testing" in %{14210} OR "None" in %{14210} OR "Yes" in %{14211} OR "Testing" in %{14211} OR "None" in %{14211} OR "Yes" in %{14212} OR "Testing" in %{14211} OR "None" in %{14212}

  4. Fidel Castro Armario repo owner

    Sorry, I misunderstood your requirements. Try this boolean expression:

    "Yes" not in %{aaaaa} AND "Testing" not in %{aaaaa} AND
    "Yes" not in %{bbbbb} AND "Testing" not in %{bbbbb} AND
    "Yes" not in %{ccccc} AND "Testing" not in %{ccccc}
    
  5. Scott McDonald reporter

    Fantastic! One last question - if the user doesn't select a value in one of the 3 multi-select fields, is there a way to account for that and have the error message appears if a no value is selected?

  6. Log in to comment