JMWE validate two field

Julian Governale
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.
June 10, 2022

Im trying to validate two aspects

On Create screen, if the system downtime was indicated as yes - Radio (Yes, No), then Start of System Downtime is required to create the issue

 

When closing an issue

If system downtime was indicated as Yes, then resolved downtime is required to close the ticket

 

System downtime Radio (yes, no): issue.customfield_11009

Start of System downtime: issue.customfield_11006

Resolved downtime: issue.customfield_11007

 

How can i achieve this in JMWE?

2 answers

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2022

You can add two validators: One on create and one on the transition(s) to Done:

  • Create: choose the Field Required PF, choose the "Start of System downtime" as required field and place a condition that issue.customfield_11009 == "yes"
  • Close: choose the Field Required PF, choose the "Resolved downtime" as required field and place a condition that issue.customfield_11009 == "yes"
0 votes
Julian Governale
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.
June 10, 2022

With the help of a colleague, i believe we have found a solution. 

 

For Create im doing

issue.customfield_11009.value == "No" || !!issue.customfield_11006

 

For close of the ticket  im doing

issue.customfield_11009.value == "No" || !! issue.customfield_11007

 

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2022

Are you sure you want ||, instead of &&?

Julian Governale
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.
June 10, 2022

From our testing when && was used it would block creating tickets when users selected No when populating the system down time field.  When no is selected, the start of system downtime is not needed to be populated because there wasnt an outage so no need to indicate the date and time it started because that never actually happened

When we used || it allowed users to be able to select No and leave start of the system down time field empty

When users select yes, they have to populate start of system downtime field to be able to create the issue.

I initially thought the exact same thing that && should be used but it wasnt working as i expected. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events