Automating Project Configurator with ScriptRunner
Automate your Jira migrations using Project Configurator with ScriptRunner.
It is now possible to access Project Configurator's features (version 2.3.7-J7) from a Groovy script in ScriptRunner for Jira. That's right! You can now go a step further in automating your Jira environment by leveraging Project Configurator's Java API and creating a REST Endpoint in ScriptRunner.
In this post, we will show you what's possible with the new Java API feature and how you can leverage it to take automation in Jira to the next level.
Project Configurator lets you migrate projects and project configurations from one Jira environment to another. If you want to automate your processes further, you can now access Project Configurator's new Java API and connect to ScriptRunner for Jira.
Create your own automation framework
You can use ScriptRunner for Jira to automate some of the functions in your Project Configurator such as import project, import project configuration, and export project(s). With this new feature, you have the power to create your own Jira environment architecture and automate your end-to-end processes from staging right through to production.
You can also use this feature to enable best practice approaches towards change management by automating your project archiving processes. By creating notification alerts through this new feature, you can keep up-to-date on any changes to your project configuration. You can also schedule scripts to automatically perform import/export functions for you, giving you complete freedom to build your own change management process.
Improve compliance, build consistency and save time
The real benefit of automating Project Configurator functionality with ScriptRunner is the time saving it offers you, your tasks can be performed automatically at scheduled intervals, including daily, weekly, monthly, or as often as you wish.
By exposing Project Configurator's API to ScriptRunner, you also open up a world of opportunities to connect with other apps, for example, you can leverage PC data for reporting, test management, ops monitoring, etc.
One of the most significant challenges our customers face is the inability to enforce compliant protocols in their Jira environment. With so many users on Jira making additions and changes it can be a nightmare to keep track of what's going on let alone create a structured compliance process. By combining the power of Project Configurator with ScriptRunner, you can design, create and implement a structured change management process in Jira.
Building consistency is another challenge that comes with maintaining change processes in Jira. By using ScriptRunner you can create automated alerts to keep your Jira environment in check and set up a regulated workplace to optimise all your processes. If you have a team of Jira admins, you need to ensure that no matter who is responsible for managing Jira, everyone follows the same code of conduct that you have put in place.
How Project Configurator works with ScriptRunner
Project Configurator's documentation includes simple ScriptRunner API export/import examples, using Synchronous or Asynchronous export/import. It is possible to run the Synchronous/Asynchronous examples directly in the script console which offers a huge benefit for customers who use ScriptRunner and Project Configurator together. You can also build your own script plugin so that another Atlassian plugin will easily integrate with Project Configurator.
How-to guide and ready-to-use scripts
The Project Configurator documentation gives you ready-to-use examples and user guides.
Before getting started, here are a few best practice tips to keep in mind:
- To use Project Configurator (PC), you need to have an instance that provides the required operation:
- ProjectCompleteImporter or
- In the PC documentation, the example instances have been retrieved using a call to:
// Code box
- Project Configurator is able to run in two modes: asynchronous and synchronous.
- The Groovy code examples can be used in ScriptRunner's script console (inside Jira) to show how to use the API both synchronously and asynchronously.
- Methods that run in synchronous mode are explicitly marked so in their name (e.g. exportSynchronous(...) ). On the other hand, methods that run asynchronously do not have any special name (e.g. export(...) )
When using Project Configurator from Java code, you need to:
Add dependency in the pom.xml
Access API components from your Java code
Hopefully this post inspires you to use Project Configurator's Java API with ScriptRunner to create new and exciting automations.
At Adaptavist, our goal is to help you work faster and achieve more with your Atlassian tools. We are always focused on providing our customers with the best solutions possible to make their work life easier. To help us to continuously improve our offering we would love to hear your thoughts and experience of using Project Configurator through this short survey.