Writing Scripts - Beyond the Browser
ScriptRunner users are a diverse lot. We run the gamut from people who exclusively use the point-and-click pieces of the product without writing a single line of code to savvy developers who want to use the best development tools and practices available to streamline their scripting experience. In between those two extremes are people ranging from "I can copy and paste code from the documentation" to "I write my own custom scripts all the time. I am dabbling with developer tools. I get stuck a lot, but they’re worth the effort."
We want to guide you no matter where you are on the path to scripting enlightenment.
If you regularly find yourself on Atlassian’s Community site asking, "I have ScriptRunner, how can I…" questions, you’re an Explorer. You primarily use ScriptRunner to gather information about your Atlassian application. For example, you may occasionally run a built-in script or copy and paste some code into the Script Console to get information or make a bulk update that the UI just can’t accomplish. In ScriptRunner for Jira, you probably use JQL functions heavily. In Confluence, you probably use the built-in macros quite a bit, and you may have touched a Search Extractor or a custom CQL function on occasion.
If you’re concerned about continuous integration, infrastructure as code, or automated testing, you’re a Builder. You may have a job title like "Developer", "Software Engineer", or something with "DevOps" in it, depending on how hip your company is. You may even be a Jira or Confluence admin who reads blogs by & for people with the aforementioned job titles and an interest in implementing those concepts. If you’re a Bitbucket Server or Bamboo admin and user, odds are good you’re in this group as well, as you’re using developer tools.
Again, our goal in this guide is to help you along the path, wherever you are in the journey. If you need an experienced traveler to guide you, our growing course offerings at Adaptavist Learn are the best bet. If what you’re looking for isn’t there yet, ask us about it. We want to know what you want, training-wise.
If you don’t have a test or QA instance of Jira, you should; it’s the best way to test your scripts without fear of creating problems in your production Jira instance. You can get a development license to setup a test server where you can run a cloned instance of your Atlassian application’s configuration.
For people who need a little something to take their scripting game to the next level, we recommend that you start with connecting IntelliJ IDEA to your Jira test server*. If you’ve worked on writing your own scripts and want to speed up your development, this one’s for you.
For software developers and their ilk, you probably have a host of other concerns. If you find yourself asking questions like these:
How can I track changes to my scripts and their configuration in a source control tool like Git?
How can I write and run automated tests to make sure my scripts work as I expect across Atlassian product releases, server migrations, and ScriptRunner updates?
How can I build and deploy my scripts as a packaged solution, first to a test or QA environment, and then to production?
For the Unsure
Not sure which tidy box to put yourself in? That’s okay! Start with connecting IntelliJ IDEA to your Jira test server to help you write your own custom scripts faster. If you find yourself wanting more, have a look at the options for Builders. We realize and celebrate that scripters often blur the line between programmer and user. Embrace the scripting spirit, and just try something. On your test server, of course. ;)
Have questions? Visit the Atlassian Community to connect, share, and learn with other Atlassian users and experts, including Adaptavist staff.
Want to learn more? Check out courses on Adaptavist Learn, an online platform to onboard and train new users for Atlassian solutions.