Import multiple rules into JIRA Automation Plugin

How to import multiple rules from one file into JIRA Automation Plugin?


I exported a rule to determine the JSON format. Then, in a text editor I copied/edited the rule to create multiple rules. Then, I created a file with multiple such rules.

 

{rule1}
{rule2}

 

The Import Rule imported only the first rule from this file.


I tried delimiting with commas and surrounding with braces - that failed.

 

[
{rule1},
{rule2}
]

 


I tried guessing a “rules” object, that failed.

 

{
 “rules”: [
               {rule1}
               {rule2}
             ]
}

 


Full example file:


 

{
 "name": "rule1",
 "actor": "a@email.com",
 "trigger": {
   "moduleKey": "com.atlassian.plugin.automation.jira-automation-plugin:issue-event-trigger",
   "params": {
     "eventSyncProcessingOverride": [
       "none"
     ],
     "userCustomFieldId": [
       ""
     ],
     "currentIsInGroup": [
       "true"
     ],
     "jiraJqlExpression": [
       "project = \"The Project\" AND reporter in membersOf(\"client-Acme\")"
     ],
     "jiraEventId": [
       "1"
     ]
   }
 },
 "actions": [
   {
     "moduleKey": "com.atlassian.plugin.automation.jira-automation-plugin:edit-issue-action",
     "params": {
       "jiraEditFields": [
         "customfield_10501=1234"
       ]
     }
   }
 ],
 "enabled": true
}

{
 "name": "rule2",
 "actor": "a@email.com",
 "trigger": {
   "moduleKey": "com.atlassian.plugin.automation.jira-automation-plugin:issue-event-trigger",
   "params": {
     "eventSyncProcessingOverride": [
       "none"
     ],
     "userCustomFieldId": [
       ""
     ],
     "currentIsInGroup": [
       "true"
     ],
     "jiraJqlExpression": [
       "project = \"The Project\" AND reporter in membersOf(\"client-Loony\")"
     ],
     "jiraEventId": [
       "1"
     ]
   }
 },
 "actions": [
   {
     "moduleKey": "com.atlassian.plugin.automation.jira-automation-plugin:edit-issue-action",
     "params": {
       "jiraEditFields": [
         "customfield_10501=5678"
       ]
     }
   }
 ],
 "enabled": true
}

 

1 answer

Automation Tools for JIRA is based off of the JIRA Automation Plugin and offers a similar feature where you can select multiple JSON rule files to import all of them at once.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

42 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you