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
Get ready! Demo Den Episode 4 is coming your way on Tuesday, May 28, 2018 with a Continuous Integration and Delivery special demo. CircleCI Director of Solutions Engineering, Eddie Webb will show us ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events