On this page

Use case

Within Jira you can use different priorities to classify your issues.

In the following use case we explain how to set the assignee based on the selected priority.

Configuration

Add the Update field based on rules to the desired transition or create a new transition.

You can add the post function to the create transition of the workflow so that the assignee get's automatically set every time an issue is created.

Source field

Choose Priority

Target field

Choose Assignee

Rules

First rule

Select Text comparison

Source field value

Enter the name of the priority, e.g.

High

Target field value

Enter the username that should be assigned to the ticket when the specified priority was selected:

agrant

In this case, the user with username agrant will be set as assignee, if the priority High was selected.

Second rule

Select Text comparison

Source field value

Enter the name of the priority, e.g.

Highest

Target field value

Enter the username that should be assigned to the ticket when the specified priority was selected:

eparis

In this case, the user with username eparis will be set as assignee, if the priority Highest was selected.

Proceed with the configuration like shown in the previous steps and adapt the rules according to your needs.

The current implementation works just fine, as long as priorities don't get renamed. If for e.g., the priority High is renamed to Urgent the above configured post function won't work correct anymore.

The following implementation is an alternative that even works after renaming priorities!

Alternative implementation using priority()

Instead of entering the priority name itself, we will use the parser function priority() with the priority id.

Head over to your Jira Administration → Issues → Priorities

Hover over the Edit button of the desired priority and grab the id from the URL.


The URL might be something like:

http://your-domain.com/secure/admin/EditPriority!default.jspa?id=1

The id can be found at the end of the URL: id=1.

If the id of the priority Highest was 1, the expression would be:

priority(1)

Update the above rules like follows:

First rule

Select Logical expression

Expression

Enter the the following expression:

%{issue.priority} = priority(<id>)

Replace <id> with the actual id of the desired priority.

Target field value

Enter the username that should be assigned to the ticket when the specified priority was selected:

agrant

In this case, the user with username agrant will be set as assignee, if the priority High was selected.

Second rule

Select Logical expression

Expression

Enter the following expression:

%{issue.priority} = priority(<id>)

Replace <id> with the actual id of the desired priority.

Target field value

Enter the username that should be assigned to the ticket when the specified priority was selected:

eparis

In this case, the user with username eparis will be set as assignee, if the priority Highest was selected.


Screenshots



If you still have questions, feel free to refer to our support team.