Set the Assignee based on the Issue type

Use case

From time to time you might come to the point where you want to set assignees based on specific rules.

This use case is an easy example where the assignee is set based on the issue type.


⚒️ Configuration

Add a Update fields post function to the workflow transition you want. The Create issue transition might be the best choice here.

Target issue

Choose Current issue

Fields

Choose Assignee

Value

In the popup, choose the value Set field value manually (parser expression)

Expression

Enter the following expression:

Bash
%{getMatchingValue(%{issue.issueType}, ["Task", "Story", "Bug"], [%{issue.creator}, %{issue.project.lead}, %{issue.assignee}])}

with parsing mode set to General.

Using this expression, the assignee will be set to the following user:

  • If the issue type is Task → Assignee will be set to the issue's creator

  • If the issue type is Story → Assignee will be set to the issue's project lead

  • If the issue type is Bug → Assignee will remain the currently set assignee

  • If the issue type is none of the above → Assignee won't be updated


📚 Related use cases