we have a Custom script validator, it does report failure from the frontend that the enduser failed the validation of a input of a field, but from the backend of the execution history, it supposed to be show a failure(red) icon but instead it shows success(green icon) on the execution. this is the snippet in scriptrunner how it throw error
errMsg = "The Planned for release does not have valid format. Please contact release leader"
log.error errMsg
throw new InvalidInputException("customfield_18038", errMsg)
the icon on the execution is supposed to be red, but it shows always green. we see this after we upgraded the jira to this version: v8.13.10#813010-sha1:156ab00
I am not sure if I am understanding the question properly, but if I am, then I think there is a misunderstanding about what the Scriptrunner execution status is telling us.
When a validator runs, it can do one of three things:
So, the Scriptrunner indicator is looking at whether the validator worked. It is not looking at the results of the validation, it does not care if the validation passed or failed - both "yes" and "no + invalidinputexception" returns from the validator are valid and expected responses that means the script worked.
The Scriptrunner indicator tells you if the validator threw an error - if it crashes or fails and does not return either of the two expected responses. Yours is showing green because the script is working ok
if the validator excution would still be regarded as "pass" even there's an exception thrown as in my case, so is there a way to show red icon on the validator execution for an exception?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, that is not what the indicator is for. As I said, the flag is telling you whether the script worked or not, not whether the validation failed.
Jira tells the user that the validation failed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.