Automating Project Configurator with ScriptRunner

It’s now possible to gain access “Project Configurator’s” features  from a script in ScriptRunner for Jira!

After reading this article, you’ll be able to take advantage of the new Java API feature and take your Jira automation to the next level.

Through the “Project Configurator” you are able to migrate projects and their respective configurations from one Jira instance to another. Thanks to the new Java API,  you are able to automate this process further through ScriptRunner for Jira

Creating your own automated framework

With the aid of ScriptRunner for Jira, you can automate various functions in your Project Configurator such as, importing a project, importing a certain project configuration and export it.

Thanks to this new feature, you’re empowered to create your own Jira environments infrastructure and automate your process from start to finish.

 

Improving build consistency, compliance and time management

The most beneficial aspect of automating the Project Configurator with ScriptRunner is the amount of time you save. All your tasks can be executed automatically at intervals of your choice. From daily or weekly or as often as your heart desires.

Possibly the most significant challenge many of our customers face is the lacking ability to enforce compliant protocols in their Jira environments.

With many users on Jira making changes to the environment, it can quickly become an absolute nightmare to keep on top of whats going on, never-mind creating a compliance process. By putting together the power of ScriptRunner and Project Configurator, you can create, implement and design a structured change management process in Jira.

A few ready to use scripts and a guide

Before you get on your way, here are a few tips to keep in mind.

  • To use Project Configurator (PC), you need to have an instance that provides the required operation: 
    • ProjectConfigExporter, 
    • ProjectConfigImporter, 
    • ProjectCompleteImporter or 
    • ProjectCompleteExporter
  • In the Project Configurator documentation all the example instances have been retrieved using a call to the following line of code:

 

 ComponentAccessor.getOSGiComponentInstanceOfType(…).
  • PC can run in two modes. Synchronous and Asynchronous
  • 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(…) )
  • The Groovy code examples can be used in ScriptRunner’s script console inside Jira in order to show how to use the API both asynchronously and synchronously.

Hopefully this post inspires you to use Project Configurator’s Java API with ScriptRunner to create new and exciting automations.