I have admin role and I tried to create a behaviours in Script runner about If user select "High" or "Highest" priority, they required put Target end date on those ticket. However, after script enabled, click "Create" button unable to create ticket. Any help will be appreciate!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Only I choose High or Highest Priority and choose a date, it unable to create ticket. If I choose Low/Lowest/Medium Priority, "Create" button is working.
Do you think this issue related to behaviours setting up or related something like javascript error or a Plugin?
Do you know how to fix this or set up something to around this?
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Where did you get the idea to use the setError function?
Looking at the API documentation for Scriptrunner Behaviors for Jira Cloud, that is not listed as an available function.
https://docs.adaptavist.com/sr4jc/latest/features/behaviours/behaviours-api
I found it listed in the document for Scriptrunner Behaviors for Jira Server/Data Center. There it says that using this function indicates the field has an error and the user won't be able to submit the form. The function is not used to specify the error message if the required field is left blank, but is used to indicate that there is an error.
https://docs.adaptavist.com/sr4js/6.30.2/features/behaviours/api-quick-reference
What happens if you remove the setError statements from your script?
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.