Does InvalidInputException not work for verison 6.2.1?

I'm trying to make a custom script validator to cause about 10 fields to be required based on the input of 1 field, so I started off messing around with making a loop to issue errors to all these fields, but over time I started to get suspicious because no matter what I wrote, the transition would go through just fine and the log says there was no errors.

So what I did was just make a simple input validation script to test.

if (issue.getCustomFieldValue(signatureNeeded) == "Yes){
    throw new InavlidInputException("Signature Needed", "Signature Needed is required")

 I went in the issue, set the value to Yes, and sent it to Peer Review and it still went through. I don't know what I'm doing wrong, or if it's just broken, and I really don't want to have to make a bunch of simple script validators to set requirement.


And before you ask, I know I can use behaviors, but currently my tasking is to re-create an already existing system before I go and overhaul it, and the current setup is that depending on Signature Needed is Yes or No, a bunch of other fields are required on transition... I know there is a ton of stuff wrong that can be improved upon but they want it exactly the same...


3 answers

Did you copy and paste that or type it? Because there are several mistakes in that code, which should be obvious.

If Signature Needed is a radio custom field, which I guess it is, you want:

issue.getCustomFieldValue(signatureNeeded)?.value == "Yes"



No, it's not a copy and paste. I had to type it because copy and paste on this site brings up a "Site Not Found" popup

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 09, 2018 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

251 views 6 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you