JMWE: If - Else logic for jira fields

Jurica Petricevic
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 11, 2022

Hi Community,

i have the following problem:

When at the fields "Goals realized" or "Quantitative benefits realized" No or Partial is selected, then should the fields "Objectives Note", "Quantitative benefit Note" and "Qualitative benefit Note" be required.

When at the fields "Goals realized" or "Quantitative benefits realized" Yes is selected, then shouldnt the fields "Objectives Note", "Quantitative benefit Note" and "Qualitative benefit Note" be required.

Does anyone have any idea how to do this the easiest way?

 

Best regards

Jurica Petricevic

 

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 11, 2022

Hi @Jurica Petricevic 

are you trying to do that on a transition (or issue creation) screen?

Also, are "Goals realized" and "Quantitative benefits realized" two single-select type custom fields?

If so, you can add a "Fields Required Validator (JMWE app)" Validator to your transition, select "Objectives Note", "Quantitative benefit Note" and "Qualitative benefit Note" as the required fields, check the "Conditional validation" checkbox, and use this script:

issue.get("Goals realized") != "Yes" || issue.get("Quantitative benefits realized") != "Yes"
Jurica Petricevic
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2022

@David Fischer thank you very much.

TAGS
AUG Leaders

Atlassian Community Events