On this page

Use case

Within Jira you can use different issue types to classify your issues.

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

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 issue type gets automatically set/updated every time an issue is created.

Source field

Choose Issue type

Target field

Choose Assignee

Rules

First rule

Select Text comparison

Source field value

Enter the name of the issue type, e.g.

Task

Target field value

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

agrant

In this case, the user with username agrant will be set as assignee, if the issue type Task was selected.

Second rule

Select Text comparison

Source field value

Enter the name of the issue type, e.g.

Story

Target field value

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

eparis

In this case, the user with username eparis will be set as assignee, if the issue type Story 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 issue types don't get renamed. If for e.g., the issue type Bug is renamed to Error the above configured post function won't work correct anymore.

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

Alternative implementation using issueType()

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

Head over to your Jira Administration → Issues → Issue types

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


The URL might be something like:

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

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

If the id of the issue type Task was 10100, the expression would be:

issueType(10100)

Update the above rules like follows:

First rule

Select Logical expression

Expression

Enter the the following expression:

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

Replace <id> with the actual id of the desired issue type.

Target field value

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

agrant

In this case, the user with username agrant will be set as assignee, if the issue type Task was selected.

Second rule

Select Logical expression

Expression

Enter the following expression:

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

Replace <id> with the actual id of the desired issue type.

Target field value

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

eparis

In this case, the user with username eparis will be set as assignee, if the issue type Story was selected.


Screenshots



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