Automation Limits - How to use 1 rule to assign to different users
Asked by RSavage_stellarindustrial_com:

We are really struggling with the new automation limits and can't afford to update to the next level of licensing, just for this.

We have a lot of rules looking for key words and then assigning to users. Can these be combined?   

For example:

When a rule is triggered on

issue created

issue updated

IF all match

Dept is one of: XXX

Tags contain: xxx

Then assign issue to ; john doe  

I have 13 rules just for this process.


Answers:
author: Trudy Claspill
body: Hello [@RSavage_stellarindustrial_com](/t5/user/viewprofilepage/user-id/4276797)

Have you looked into using the IF-ELSE condition?

<https://support.atlassian.com/cloud-automation/docs/jira-automation-conditions/#If-else-block>

![Screenshot 2024-02-06 at 11.15.19?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/304699i18461A9EFA212285/image-size/large?v=v2&px=999 "Screenshot 2024-02-06 at 11.15.19?AM.png")

comments: author: RSavage_stellarindustrial_com
body: I'm really new to this, so If you can help me, that would be great. Our automation rules are triggering too often.  

We have conditions when an email contains, then assign a tag and if that tag = xxx assign it to a user\>  

We are doing this on create and edit.  

I'm sorry, I hope I'm making sense


author: Trudy Claspill
body: Please provide a screen image showing a complete example of one of the original rules.

The rule execution will not count against your limit unless a productive action is executed.

If your rule is triggered, and

1. if you have conditions after the trigger, and
2. actions are taken only if the conditions are met, and
3. the conditions are not actually met for the issue that triggered the rule,

then that does not count as an execution against the execution limit. You can find more information about that here:

<https://www.atlassian.com/blog/announcements/cloud-automation-packaging-update>

If you still want to collapse the different rules into one rule note that there is a l[imit to the number of components](https://support.atlassian.com/cloud-automation/docs/automation-service-limits/) you can have in a single rule, and that limit is 65 components. If the only variance between the 13 rules is the If condition and to whom the issue is assigned then you should be within that component limit.

In the new rule start with the same trigger, and then elect to add the Condition. Choose the "IF or ELSE" condition.

![Screenshot 2024-02-06 at 1.31.47?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/304731iEACA67E19921C100/image-size/large?v=v2&px=999 "Screenshot 2024-02-06 at 1.31.47?PM.png")

Add your conditions from the first of the 13 rules.

![Screenshot 2024-02-06 at 1.35.07?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/304733i786E2ACE7910E025/image-size/large?v=v2&px=999 "Screenshot 2024-02-06 at 1.35.07?PM.png")

Click Next (in the dialog) or Add Component (directly below the **If: all match** in the tree on the left), and select **THEN: Add action**, and add the action to assign the issue.

![Screenshot 2024-02-06 at 1.37.45?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/304734i836280FFBD17F57F/image-size/large?v=v2&px=999 "Screenshot 2024-02-06 at 1.37.45?PM.png")

Then click the **Add else** button in the tree.

![Screenshot 2024-02-06 at 1.37.56?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/304735iB8335BA4CAA7E838/image-size/large?v=v2&px=999 "Screenshot 2024-02-06 at 1.37.56?PM.png")

Repeat the steps to add the conditions and assignment from the second rule. Then click **Add else** again.

![Screenshot 2024-02-06 at 1.40.47?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/304736i212CEF349DC53F4E/image-size/large?v=v2&px=999 "Screenshot 2024-02-06 at 1.40.47?PM.png")

Repeat those steps until you've added the conditions/assignments from all 13 rules.

You will want to disable the 13 rules and leave only this one combined rule enabled.

One thing to note about your comment that the rule(s) are being triggered too many times. Your triggers are Issue Created and Issue Updated. Every one of those 13 rules would be triggered every time an issue is created in the project, and every time an issue in that project is updated in any way - change to any field, change of Assignment, change of Status, addition of a comment, etc.

If you are always checking the Department and Tags fields, you may want to instead have three rules; one triggered by Issue Created, one triggered by change to the Department field, and one triggered by change to the Tags field. That would also reduce the number of times the rule(s) are triggered.


Tags: automation

cloud

jira-service-management

jira-service-management-cloud