Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,295,489
Community Members
 
Community Events
165
Community Groups

JMWE validate two field

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 Community Leader Jun 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"

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 Community Leader Jun 10, 2022

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

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
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,453 views 37 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you