tutorial

Automatically assign created issues based on criteria in Jira

Kev Zettler Szerző: Kev Zettler
Browse topics

You can create a Jira automation rule by using an if/else condition, which automatically assigns issues to groups of users based on their issue types.

Navigate to the Automation tab of your project settings in Jira. In the rules tab, click on Create rule in the top right corner of the screen. On the New trigger screen select Issue created and click Save.

Navigate to the Automation tab of your project settings in Jira. In the rules tab, click on Create rule in the top right corner of the screen. On the New trigger screen select Issue created and click Save

On the Add component screen, click New condition.

On the Add component screen, click New condition

On the New condition screen select the if/else block option. This creates a condition that initiates an action depending on criteria in the automation rule.

On the New condition screen select the if/else block option. This creates a condition that initiates an action depending on criteria in the automation rule.

On the If block screen, click Add Conditions...

On the If block screen, click Add Condition...

In the If Block screen, select the Issue fields condition option.

In the If Block screen, select the Issue fields condition option.

For this demo we set the condition for Issue Type > equals > Bug. Be sure to click Save.

For this demo we set the condition for Issue Type > equals > Bug. Be sure to click Save.

Next, add an action that assigns bugs to a certain group of users. On the left sidebar, which has a summary of the automation rule, click the Add component text underneath the If:matches condition.

Next, add an action that assigns bugs to a certain group of users. On the left sidebar, which has a summary of the automation rule, click the Add component text underneath the If:matches condition.

You will be prompted for a New component. Click New Action.

You will be prompted for a New component. Click New Action.

On the New Action screen search for and click the Assign issue option.

On the New Action screen search for and click the Assign issue option

From the Assign issue prompt, select a user who will be assigned issues. Click the Save button.

From the Assign issue prompt, select a user to assign bugs to. Click the Save button.

Next you can add an if/else condition to the If:matches condition. If the condition in the If block does not match, then the rule will evaluate the Else block. Click on the Add else text on the left sidebar.

Next you can add an if/else condition to the If:matches condition. If the condition in the If block does not match, then the rule will evaluate the Else block. Click on the Add else text on the left sidebar.

You will be brought to the Else block screen. Click the Add conditions text and select another Issue fields condition.

You will be brought to the Else block screen. Click the Add conditions text and select another Issue fields condition.

Add a new condition to the Else-if block. The example below demonstrates how to add a new Else-if condition that is activated when the issues type value equals Task.

Add a new condition to the Else-if block. The example below demonstrates how to add a new Else-if condition that is activated when the issues type value equals Task.

Repeat the steps to add an action to the Else-if condition. The example below illustrates how to create an additional action that assigns the issue to another user.

Repeat the steps to add an action to the Else-if condition. The example below illustrates how to create an additional action that assigns the issue to another user.

This rule has If and Else-if conditions that checks for a certain type of issue so that subsequent actions are performed once either condition matches. Next, fill in the remaining Else condition with another action. Click on the add else text located on the rule details sidebar then click the Save button. Repeat the above steps for adding an Assign issue action to the new Else condition.

The example below reveals how to set the Assign issue action to automatically assign the issue to a user in a list.

How to set the Assign issue action to automatically assign the issue to a user in a list.

This Assign issue demonstrates the Balanced workload assignment that automatically assigns the issue to users in the list. The Balanced workload assignment evenly distributes assignments so that a user in the list is not assigned more issues than the others. Once you configure the new Assign issue action, click the Save button.

The following screenshot details what the final rule details should look like: It should include:

1 Trigger - When: Issue created

3 Conditions - If:matches, Else-if:matches, Else

3 actions - Then:Assign the issue to x 3

Next, set a name for the rule and click the Turn it on button. In the example below, we used the name “Auto assign issues by type”. You should see the following success indicator.

click the Turn it on button

Now that the rule has been enabled you can trigger it by creating some issues within your project. Try creating a Bug or Task type issue. You can then verify that the automation rule is functioning successfully by visiting the Audit log.

Now that the rule has been enabled you can trigger it by creating some issues within your project.

The Audit Log will show you the history of the automation rule from its creation and execution. If there are any issues or bugs with the automation rule, the Audit Log will highlight them and offer debugging support. If you would like to explore other examples of rules, head over to our rule template library.