Run All Transition Validators, Even When One Fails

Jeffrey Gullett July 15, 2019

Is there a way in Jira to ensure all validators are run during a workflow transition, even if one of them fails?

More details:

I have added multiple validators to a workflow transition.  Each of the validators generates a user-facing error message when the validator fails.  The issue is that the customer is provided the transition screen I have configured.  Let's say that (s)he enters invalid data for fields 1, 2, and 3.  Currently, the validator for field 1 is run, and fails with an error message to the user.  The user then fixes field 1, and resubmits.  Now, the validator for field 2 is run and produces an error message.  The client fixes that error, then resubmits.  Now there is a problem with field 3.  At this point, the user throws their computer against the wall because they are frustrated with being piece-mealed error messages that should all have been displayed the first time the form was submitted.

To prevent this terrible user experience, I would like to run all validators, regardless of whether how many of them fail, so all error messages are displayed to the user up-front.  Is there a transition property or Jira add-on that would enable doing this?

1 answer

1 accepted

0 votes
Answer accepted
Ilya Turov
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.
July 15, 2019

I guess, the only choice here is to create your own validator with something like Scriptrunner where you check for all the things simultaneously and build up the error message accordingly.

Jeffrey Gullett August 12, 2019

Not the answer I was hoping for, but appears to be factually accurate.  I was also unable to find an add-on that enabled running multiple validators under one umbrella validator (e.g., hide the fact that multiple validators are running from Jira, by grouping any set of validators within a single Jira validator).  To get around this limitation I ended up writing my own Javascript validation logic and removed all the Jira validators.  This was annoying since my Javascript validation logic is fragile (it relies on the structure of the HTML, which Atlassian could change at any time), but it is the only option I could come up with to present a reasonable user experience.

Carol Jones September 16, 2019

@Jeffrey Gullett - Based on this, have you suggested this a feature for future review within http://support.atlassian.com?  I know our team is looking for the same thing for the same reason, so we could bump the voting up some if you already have something out there.

 

Update: Looks like one was already created, but closed as "Won't Fix"
https://jira.atlassian.com/browse/JRASERVER-16327

Maybe if enough folks comment, asking them to reconsider, they would at least open it back up and place in their 'Gathering Interest' bucket ..

Marcel Caroly
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2022

Heya, it might not be the most beautiful experience, and it's not on Jira server, but there's some limited support for this in JIRA Cloud now. Here's an example where I've set up a required field validators and a regular expression validator together. 

multiple-validaton-errors.png

Suggest an answer

Log in or Sign up to answer