Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

script validator

Amira Nadeem
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 8, 2023

Hello Team,
Can you please help me with this validator?
We have a field "XYZ" with Yes/No/Unknown options, default value set to Unknown and to push the workflow status to In-progress we need this field's options be either Yes or No. Can you please help ASAP? Thanks!

1 answer

1 vote
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2023

Hi @Amira Nadeem 

Depending on the need, you'll need either a Validator or a Condition:

  • Condition: Stop the user from transitioning to "In Progress" if XYZ != Yes OR No
  • Validator: Confirm the field has been populated or is populated during the transition

---

From your current description, it sounds like the Condition would work better. It will look like this:

  • Condition 1: Value Field
    • Field = XYZ
    • Condition = "="
    • Value = Yes
    • Comparison Type = String
  • Condition 2: Value Field
    • Field = XYZ
    • Condition = "="
    • Value = No
    • Comparison Type = String
  • Condition Rules: Set the drop-down box in the left-hand corner to Any of the following conditions - so that it's an OR statement, not an AND

---

A few notes on this:

  • I've assumed this is a Company-managed Project based on the question
  • The Condition is being set in the Workflow's transition configuration - i.e where Validators usually go. To get here (as a Jira Admin):
    • Go to Settings > Issues
    • Select Workflows from the left-hand menu
    • Select your Workflow, and edit it
    • Select the appropriate "In Progress" transition
    • Select Conditions
  • The reason I've used "= Yes / No" rather than "!= Unknown" is because you also need to factor in EMPTY (i.e no value) - so either way it would be two conditions.

---

Let us know if this meets your need!

Ste

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events