Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to automatically assign a user to a subtask

How do I automatically assign a user to an existing subtask?

1 comment

Hi @Angela DiCesare

By default, your sub tasks will be assigned to the component lead. If one of your sub tasks should go to a different user, you can hard code this change in the post function.

NOTE: This solution utilizes script runner add-on to hard code the assignee to the sub task.

  1. Go to your project
  2. Click Project Settings
  3. Click Workflow
  4. Edit your workflow
  5. Choose diagram
  6. Click the first transition (create), then click Post Functions
  7. Click Script Post-Funciton [ScriptRunner]
  8. Create sub task
  9. Condition = the script for identifying the component:

    import com.atlassian.jira.bc.project.component.ProjectComponent
    import com.atlassian.jira.component.ComponentAccessor

    for(ProjectComponent projectComponent: issue.getComponentObjects()){
    if(projectComponent.getName().equals("COMPONENT NAME"))
    return true
    return false

  10. Target Issue Type = Sub-task
  11. Sub Task Summary = What the sub task will be called
  12. Additional issue actions field:

    issue.assigneeId = "TYPE USER NAME HERE"

  13. Click Update
  14. Publish the workflow changes

Hope this helps or at least gets you past 1 hurdle!

- Jonathan

Like # people like this

Hi, I would like to do the same automatic assignment but I can't find the "Additional issue action" field on the "Post function" list.

Can you give me any suggestions?



Jonathan Smith Community Leader Sep 24, 2019

@Carlo Anapoli 

   I updated the response above.

My setup is to generate a sub task based on selection of a component. The sub task will then auto assign to whoever we hard code in step 12.

It is messy but it works.

- Jonathan

Like Carlo Anapoli likes this


Log in or Sign up to comment
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

177 views 2 1
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you