Upon creation, how can the issue be automatically assigned to the reporter only if an assignee isn't chosen first.

Jillian Patterson October 24, 2014

I'd like to be able to choose the assignee when creating an issue but if I forget to do so, I'd like it to default to me. I see that there are post functions that allow me to assign to myself or to the reporter upon creation but when I use those, it will override the assignee field if one was chosen initially. 

3 answers

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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 29, 2014

Update issues post function with conditioning on the assignee field not having a value. See How to condition on a field being blank or empty for instance. See also: How to update issues after initial issue create

0 votes
Jillian Patterson October 27, 2014

Hi @Randall Robertson, 

Thanks for your reply. It's actually that I want the issue to be assigned to the person creating the issue (certainly not always me smile) if and only if another person isn't already selected as the assignee upon creation. We may have use for defaulting it to the component lead - but that would still be if and only if another person isn't already selected first. It sounds like that would need to be a custom script ?

Thanks,

Jillian 

Randall Robertson
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 28, 2014

There are some plugins that allow for conditional Post-Functions. If you can get one of those installed, you may be able to check the assignee field to see if it is blank and then assign it to the reporter if it is. Otherwise, yes, you will probably need a custom script.

Randall Robertson
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 28, 2014
0 votes
Randall Robertson
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 24, 2014

One simple way to do this without having to write your own code is to set yourself as the automatic assignee on the project. Of course, that only works if you (and whoever else uses your project) don't mind you being the assignee for any issue in that project where the creator does not pick an assignee when creating the issue.

Same idea works for specific components in your project - you can make yourself the component lead and set the auto-assign to go to the component lead, not the project lead. Again, that all depends on how you and your team use components.

Suggest an answer

Log in or Sign up to answer