I want to do an automatic validation check on some fields when creating/updating an issue.
I created an custom listener, selected the relevant projects and events.
However in this simplified script:
import com.opensymphony.workflow.InvalidInputException
throw new InvalidInputException("Input not valid")
crashes with the following error message:
2018-05-17 10:03:44,565 DEBUG [runner.WithPluginCompilationCustomiser]: Compile Script15.groovy, to node: Script15
2018-05-17 10:03:44,565 DEBUG [runner.WithPluginCompilationCustomiser]: Compile Script15.groovy, to node: Script15
2018-05-17 10:03:44,831 ERROR [runner.AbstractScriptListener]: *************************************************************************************
2018-05-17 10:03:44,831 ERROR [runner.AbstractScriptListener]: *************************************************************************************
2018-05-17 10:03:44,831 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.issue.IssueEvent, file: <inline script>
[InvalidInputException: [Error map: [{}]] [Error list: [[Input not valid]]]
at Script15.run(Script15.groovy:7)
2018-05-17 10:03:44,831 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.issue.IssueEvent, file: <inline script>
[InvalidInputException: [Error map: [{}]] [Error list: [[Input not valid]]]
at Script15.run(Script15.groovy:7)
Scriptrunner 5.3.26
Jira: 7.5.3
Your listener is correctly throwing the exception. That is the error you see in the console.
Hi @Roland Holban (Adaptavist)
How to show this exception on jira UI ?
I am writing similar code above but the exception is not being shown on ui when i perform issue updated event
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.