Default assignee according to issue type

Rumceisz April 23, 2012

Hi All,

can be set default assignee for each issue type in a particular project in JIRA 4.3.4? I know that it can be set for components (as component lead), but my customer especially want to use this for issue types.

Thanks in advance!

Best regards,

Rumi

4 answers

1 accepted

1 vote
Answer accepted
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2012

A workflow post condition for the issue-type to assign it a particular user? Jamie's script runner will be of use I guess.

https://studio.plugins.atlassian.com/wiki/display/GRV/Post+Functions#PostFunctions-SetAffectsVersions%2CFixVersionsorComponents

Rumceisz April 23, 2012

Hi,

many thanks for your answer!

It's a good help for the beginning. The only problem we have, that 2 different issuetype has same workflow!

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2012

Yesh right Nic, sometimes we just overlook the simpler options.

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2012

Don't mind me saying this, duplicate the workflow :)

Or have a condition inside you script to decide based on the issueType to assign to different users.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 23, 2012

You don't even need the script runner for that post-function, you can use the built-in one to set an assignee. The script-runner would be better though - without it, you can't do any conditional logic really and you'd have to do one workflow per issue type (or rather, target user). With the script runner, you can do an "if type = A, set assignee X, if type = B, set assignee Y, else assignee = Z" type thing.

Also, if you're doing this in a post-function, it'll override anything the user puts in, so you should remove assignee from the create screen, and I suspect you're effectively hard-coding the assignees in.

Finally, you've mentioned "default" assignee, which implies you might want the user to still have the assignee and just see "user X" as a default (and then they can set it to someone else if they like). You can do that with a bit of javascript on the create screen.

0 votes
Gregory Van Den Ham
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 16, 2016

I did a work around that still requires components to be created. 

 

Step 1 - Add component with matching name as issue type, name person to auto assign. 

Step 2, Create post function to copy field to field - issue type to component fields.  

Step 3.  Create post function to assign to component/developer lead.    

(create steps 2,3 on the open transition in the workflow.)

 

It's not great, and you could probably just set component to be a required field when creating a new issue.  I've seen a lot of instances though were components are not used or not used correctly - so this might be workable for you.

 

image2016-12-16 16:20:15.png

0 votes
David Skreiner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 19, 2016

Unfortunately, ScriptRunner has become commercial.

 

The way to do this without plugins was described in several similar questions, and even answered by Atlassian:

https://confluence.atlassian.com/jirakb/how-to-automatically-assign-an-issue-to-a-user-based-on-issue-type-704413717.html

 

... you need to make a copy of the workflow (one for each issue type that needs its own default assignee), 

add a Post Function to the Create transition that changed the Assignee field to the default assignee for that issue type,

then set up a workflow scheme for your project that uses the correct workflow for each of your issue types.

0 votes
Enterprise Services August 3, 2015

I'm implementing this using JIRA Workflow Toolbox which lets you:

Set a field as a function of other fields

Per the instructions here:

https://bitbucket.org/fcarmario/jira-workflow-toolbox/wiki/post-functions/Set%20a%20field%20as%20a%20function%20of%20other%20fields

Suggest an answer

Log in or Sign up to answer