This is very confused as a question.
1) What does the title mean? What does it have to do with the body of the question? If you do mean to ask about that, then you'll need to explain what your script is supposed to be doing and what it actually does, and probably give us the relevant lines of it.
2) All I can tell you on the body of the question is below, because you've not told us what you're trying to do at all
2.1) Write the script in the right place
2.2) You import the classes you need for your script to run
Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...
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!
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