Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create button won't work

mfrench August 3, 2023

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!

 

Screenshot 2023-08-03 at 4.46.49 PM.png

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
August 3, 2023

Hello @mfrench 

Welcome to the Atlassian community.

Please show us how you set up the Behavior.

mfrench August 4, 2023

Hello @Trudy Claspill ,

Please see the screenshots-

 

Screenshot 2023-08-04 at 8.28.13 AM.pngScreenshot 2023-08-04 at 8.28.30 AM.png

mfrench August 4, 2023

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!

Trudy Claspill
Community Champion
August 4, 2023

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?

mfrench August 7, 2023

It works! Thank you so much, Trudy!

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events