Script Runner 'Create Subtask' post function - How to auto assign subtask to a user or group?

In Jira, we came up with a workflow that requires a ticket to auto-create subtasks on transition, which is no problem with the Script Runner 'Create Subtask' post function. Now, I'm trying to auto-assign the subtasks to a specific user group or individual user in the 'Additional issue actions' box of the create subtask post function. I can't seem to get the subtask to assign to either a user or a group. Any ideas on how to do this?


Here is what I'm trying to do to assign a subtask to a specific user:

import com.atlassian.crowd.embedded.api.User
import com.atlassian.jira.component.ComponentAccessor
userManager = ComponentAccessor.getUserManager()
user = userManager.getUserObject("user@company")


Also, am I solving this problem correctly? What we have is a list of about 15 subtasks that need to be created when the issue is transitioned to 'start progress', all of which need to be assigned to a specific user or group. If it makes more sense to do this using one groovy script that runs as a post function vs using the create subtask post function, let me know. Also, being pointed in the direction of some documentation on how to do this would be a huge help... I'm pretty new to Jira.

3 answers

1 accepted

The Bob Swift Create on Transition plugin worked perfectly for this.

Hi there!

I don't know if there's a built-in function on Script Runner to do this but, besides that, an easy way to do it is to create a new workflow to be used only with sub-tasks that would have a post-function on the Create transition to assign the issue to a specific user.

There are two knowledge documents that can help you with that:

Configuring Workflow

Configuring workflow schemes



Ok But How Can I Assing to Group ? Bob Swift Pluging not assing group just spesific assing !!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,334 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot