The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Manually editing json export file, for automation rules migration

Nenad Neshov
Contributor
July 23, 2024

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:


{"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.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 23, 2024

Hi @Nenad Neshov 

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

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