You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
If you're working on a Server to Cloud migration, you'll want to bring your Automation rules along! Luckily you can export your entire Automation ruleset as a JSON file, and import it into another environment. The product documentation describes how this works, but in short you simply select the option to export or import from the '...' menu in the upper right corner of the Automation page.
There are a couple hangups to be aware of:
If the Automation rules reference fields that don't exist in the site you've imported the rules to, the rules won't work!
Luckily, during a Server -> Cloud migration, the fix for this is pretty simple. The Jira Cloud Migration Assistant will add all the necessary items in your Cloud site for these object types. Simply do your Migration Assistant run before importing the rules, and all these objects should be in place before any automation rules might trigger.
Automation will try to give you some sense of what is causing the import to fail if you encounter this error:
In this example, the Server export contains an action provided from the nFeed plugin, and a corresponding action didn't exist on the Cloud site. Without going back to the Server and deleting that rule entirely, it is possible to modify the JSON file so it imports successfully.
The rules export files are minified json. In order to work with the file, you'll want to beautify it. As a vim user, I simply run a vim command once the json file is opened:
:%!python -m json.tool
Online options exist to do this in-browser as well, like jsonformatter.org or jsonformatter.io . And depending on your preferred IDE or text editor, there's probably a JSON formatter in there too!
Once you've got the file beautified, search for the component mentioned in the error message. If you want to simply exclude the offending rule from the export, you can delete the rule from the file.
The first key in a server-exported rule is typically "actorAccountID" and the last is typically "updated". You should also select and delete the curly brackets above and below these lines - and if you're in a tool that parses JSON, it should validate in the tool once the whole node is removed. Some tools let you collapse nodes, which also helps ensure you remove the entire object. In Cloud, the first and last keys don't follow this format, so exercise caution! Definitely use tooling to help validate you've removed the whole object.
In this example gif, we use JSON Formatter to collapse a rule, then delete it
Once the JSON file is modified, you can save it and try importing to Automation again in your Cloud site. You do not need to re-minify the file in order to upload it. Automation will happily import the expanded file.
In some cases, you may indeed need to reach out to Atlassian Support for assistance when importing rules into Automation in Jira Cloud. In many cases however, these checks and changes will help you get your rules imported in no time flat.
614 accepted answers