Manually editing json export file, for automation rules migration
Asked by NNJK21:

HI Team,   

I want to try editing the json file manually to be able to import automation rules in JIra cloud. So my question is, when deleting the action am deleting only this part:  

{"id":"3826","component":"ACTION","parentId":"3823","schemaVersion":1,"type":"jira.publish.event"   

or i should remove the whole block:  

<br />

{"id":"3822","component":"ACTION","parentId":"3819","schemaVersion":1,"type":"jira.publish.event","value":{"event":1,"publishBundle":false},"children":\[\],"conditions":\[\],"optimisedIds":\[\],"newComponent":false}\],"conditions":\[{"id":"3820","component":"CONDITION","conditionParentId":"3819","schemaVersion":1,"type":"jira.jql.condition","value":"\\"Company\\" = \\"One Inside (UA)\\"","children":\[\],"conditions":\[\],"optimisedIds":\[\],"newComponent":false}\],"optimisedIds":\[\],"newComponent":false},{"id":"3823","component":"CONDITION_BLOCK","parentId":"3806","schemaVersion":1,"type":"jira.condition.if.block","value":{"conditionMatchType":"ALL"},"children":\[{"id":"3825","component":"ACTION","parentId":"3823","schemaVersion":6,"type":"jira.issue.edit","value":{"operations":\[{"fieldId":"security","fieldType":"security","type":"SET","value":{"type":"NAME","value":"Inside Reality: Absence Security"}}\],"sendNotifications":true,"useLegacyRendering":false},"children":\[\],"conditions":\[\],"optimisedIds":\[\],"newComponent":false},{"id":"3826","component":"ACTION","parentId":"3823","schemaVersion":1,"type":"jira.publish.event","value":{"event":1,"publishBundle":false},"children":\[\],"conditions":\[\],"optimisedIds":\[\],"newComponent":false}\],"conditions":\[{"id":"3824","component":"CONDITION","conditionParentId":"3823","schemaVersion":1,"type":"jira.jql.condition","value":"\\"Company\\" = \\"Inside Reality\\"","children":\[\],"conditions":\[\],"optimisedIds":\[\],"newComponent":false}\],"optimisedIds":\[\],"newComponent":false}\],"conditions":\[\],"optimisedIds":\[\],"newComponent":false}\],"projects":\[{"projectId":"12100","projectTypeKey":"business"}\],"labels":\[\],"tags":\[\]},{"id":1,"clientKey":"com.codebarrel.tenant.global","name":"Auto Assign after 7 days to Capa Meeting","state":"DISABLED","description":"After 7 days of inactivity a request will be assigned to the Capa Meeting.","canOtherRuleTrigger":false,"notifyOnError":"FIRSTERROR","authorAccountId":"dominik","actorAccountId":"jira-system","created":1503647421369,"updated":1503916053593,"trigger":{"id":"128","component":"TRIGGER","schemaVersion":1,"type":"jira.jql.scheduled","value":{"schedule":{"cronExpression":"","method":"FIXED","rate":1,"rateInterval":86400},"jql":"project = \\"Inside: Absence Request\\" AND type = \\"Absence Planned\\" AND status = New AND Updated \< -7d","executionMode":"jql","onlyUpdatedIssues":true,"processIssuesInBulk":false},"children":\[\],"conditions":\[\],"optimisedIds":\[\],"newComponent":false},"components":\[{"id":"129","component":"ACTION","schemaVersion":6,"type":"jira.issue.transition","value":{"operations":\[\],"sendNotifications":true,"useLegacyRendering":false,"transitionMode":"status","destinationStatus":{"type":"ID","value":"11116"},"transitionMatch":"","ignoreConditions":false},"children":\[\],"conditions":\[\],"optimisedIds":\[\],"newComponent":false},{"id":"130","component":"ACTION","schemaVersion":1,"type":"jira.publish.event","value":{"event":13,"publishBundle":false},"children":\[\],"conditions":\[\],"optimisedIds":\[\],"newComponent":false}\],"projects":\[{"projectId":"12100","projectTypeKey":"business"}\],"labels":\[\],"tags":\[\]},{"id":4,"clientKey":"com.codebarrel.tenant.global","name":"Auto Assign to Supervisor","state":"DISABLED","description":"Automatically assign the task to the supervisor after created.


Answers:
author: Bill Sheboy
body: Hi [@NNJK21](/t5/user/viewprofilepage/user-id/5528650)

I have found only limited documentation on the structure of rule automation JSON, and this is the guidance Atlassian provides for such migrations:

* <https://community.atlassian.com/t5/Automation-articles/Troubleshooting-Server-to-Cloud-rule-migrations/ba-p/1864435>
* <https://support.atlassian.com/cloud-automation/docs/import-and-export-jira-automation-rules/>

In general, for a single rule action which is not the only one in a block (e.g., branch or if clause), I recommend using a JSON text editor to find the matching start / end curly brackets and remove only that node. Then test after the import.

Kind regards,  
Bill


Tags: data-center

jira-data-center

jira-server

new-to-jira