How to automatically assign an Issue to a user, based on Issue Type

Symptoms

User would like to automatically assign an assignee based on Issue Type that is selected on Create Issue Screen.

Scenario

Here is an example of what the user would like to achieve:

Issue Type : Bug - Automatically Assigned to Assignee : John
Issue Type : Story - Automatically Assigned to Assignee : Smith

Scenario A

1. Click the Create Issue button and the create issue screen will appear.
2. The issue type is Bug by default. Choose the Issue Type = Bug and fill in the other details. (Leave the Assignee field to Automatic), then click the Create button.
3. On the Issue ticket, the Assignee will automatically show John at the left under People.

Scenario B

1. Click the Create Issue button and the create issue screen will appear.
2. The issue type is Bug by default. Choose the Issue Type = Story and fill in the other details. (Leave the Assignee field to Automatic), then click the Create button.
3. On the Issue ticket, the Assignee will automatically show Smith at the left under People.

Resolution

Configure Workflow

1. Go to your workflow page by clicking on the Cog icon > Issues and then click on Workflows from the right pane.
2. Now identify the current workflow currently in use by the appropriate project then click on the Copy button under operations. (It's best if you use the workflow that has the DEFAULT tag next to it. You can also create a new workflow by clicking the Add Workflow button, but this will be a blank workflow.)
3. Now we will create a workflow for the first Issue Type: Bug. Name it Bug.
4. Click on workflows on the left pane, then click on the edit link under Actions for your desired workflow scheme.
5. Click on the First Step Name(id) which is Open by default. A new screen will appear showing the workflow for the Step: Open.
6. Click on Create Issue. Now you will see the Transition : Create Issue workflow page. Click on the Post-Functions tab. Click on Add post function.
7. At the Add Post Function To Transition page, scroll down and pick the Update Issue Field option then click Add.
9. Now at the Add Parameter To Function page , select Assignee as the Issue field, and then select the appropriate user for the Field Value (For Example: Smith), and click Update.
(info) Repeat steps 2-9 for another workflow for the Issue type: Story. Change the values of workflow name from Bug to Story.

 

Configure Workflow Scheme 

Now that you have 2 new workflows. You need to associate this workflow to a workflow scheme. Go to workflow Scheme:
1. Click on the Add Workflow Scheme button.
2. Give it a name (Example : "AutoAssign")
3. Click on Add Workflow > Add Existing.
4. Select the workflows your created earlier one by one. We shall select Bug first. Click next.
5. This is the screen where you map issue type to the workflow, which was already assigned to John in our example. Select Bug and then click finish.
 (info) Add the other workflows needed by repeating steps 3-5 but make sure you select a different workflow and assign an appropriate issue type to that workflow.

Now whenever you create an issue, the users will automatically be assigned based on the issue type that you have configured.

(info) Please take note that only 2 issue types are configured in this example. You may add as many, including Custom issue types.

Last modified on Feb 21, 2017

Was this helpful?

Yes
No
Provide feedback about this article

Not finding the help you need?

Ask the community

Powered by Confluence and Scroll Viewport.