By Warren Da Costa, Senior Product Manager for ScriptRunner for Jira on-premise at Adaptavist
Marketplace apps can streamline the day-to-day operations of your business, freeing up your team’s time and enhancing productivity. But with the move to new hosting types, the ability to take app data with you is critical. To keep things running smoothly, you need to be able to quickly and accurately migrate your ScriptRunner for Jira customizations and automations. And now you can move them from staging to production via an automated process using Appfire’s Configuration Manager for Jira (CMJ). Keeping your instances in sync at a ScriptRunner level has never been easier.
We’ve been working closely with our peers at Appfire to make manual migration and change management for ScriptRunner a thing of the past. You might be wondering what this means for you and your team.Let’s dive into the details!
If your Jira instance serves a lot of employees, their requests for customization can add up. Making (and tracking) changes on a live environment is never best practice for any internet-based technology deployment. But manually mirroring changes from a staging site to a live site can invites mistakes. Whenever possible, we should automate (and now you can automate more than ever).
What ScriptRunner features can Configuration Manager for Jira migrate?
The ScriptRunner for Jira features which can be migrated using Configuration Manager for Jira include:
- REST Endpoints: Integrate with external systems and exchange data.
- Jobs: Automate the running of scripts at regular intervals, saving time and reducing human error.
- Workflow Conditions: Amp up native Jira workflow condition checks to make sure a requirement is met before you can transition an issue.
- Workflow Validators: Power-up standard Jira validators by running scripts to validate your issues.
- Workflow Post functions: Get granular and precise with automated actions triggered when an issue transitions to a new status.
- Script Fields: Use Groovy to calculate or consolidate data from one or more existing fields and display them in custom fields.
- Resources: Add connections to databases so that they can be centralized for use across ScriptRunner features.
- Fragments: Dynamically modify Jira’s user interface to display relevant messages, buttons or other information.
- Listeners: Monitor (or listen) for a specific event in Jira and use it to trigger a specified action.
How to migrate ScriptRunner with Configuration Manager for Jira?
Let’s break down the process of using Configuration Manager for Jira to migrate ScriptRunner setup in more detail.
Before the migration
We recommend taking an audit of how the existing configurations are used on the system, using a tool like Appfire’s Power Admin. To do this, go to the Admin cog in the Jira menu, go to “Manage apps” and navigate to Power Admin within Configuration Manager for Jira.
From here, you can scan the Jira instance for dependencies and make sure that you understand how things work together within the instance. Once you understand what’s at play, you can decide what needs to come across to your target instance as part of the migration.
Exploratory work done, we can move onto the next step: taking a snapshot.
The migration itself
To get started, you need to choose which type of snapshot you want and make the selections for the configurations you want to export.
There are two main types of snapshot available within Configuration Manager for Jira: system snapshot and project snapshots.
- System snapshot: Takes a snapshot of the system as a whole, which is ideal for migrating the whole instance to a new location or backing up your entire instance.
- Project snapshot: Takes a snapshot of one or more projects. Your project configuration will be included and you have the option to include issue data.
To take a system snapshot:
- Select system snapshot from menu.
- Name your snapshot.
- To include ScriptRunner data, check the “include global data checkbox.”
- Now you can download the snapshot and head over to your target instance.
- In your target instance, head to Configuration Manager for Jira.
- You’ll see the snapshot you took from your source instance.t should include your ScriptRunner configuration data.)
- Deploy the snapshot to the target system. At this point, you can review the changes you’re making before applying them, so if you spot something, you need to roll back: you can easily do so.
- Configuration Manager for Jira will warn you here about any users/objects that are referenced in the target system, but which aren’t present. Make note of these missing reference objects and users so you can add them retroactively to make sure everything works flawlessly.
- Your migration is done!
ScriptRunner config: Global data versus project data
It’s worth noting that Jobs and REST Endpoints are true global data, not associated with a specific project. Workflow data (Conditions, Validators and Post functions), however, is associated with specific projects, but can also include global data. If certain information is missing from your migration, it may be because the data is not included in the snapshot type used for the migration, so double-check your settings if you were expecting to see something that isn’t there!
A project snapshot follows largely the same steps, just make sure that you choose project level snapshot as your first step.
After the migration
Post-migration, conduct both functional and user acceptance testing to make sure everything’s moved across as expected before pushing to your deployment system.
Want to see it in action? Take a look at this demo video above to see how ScriptRunner features are migrated using Configuration Manager for Jira.
If you have questions about Configuration Manager for Jira’s integration with ScriptRunner, reach out! The Appfire team would love to help.
Last updated: 2023-07-31