Assign sub-tasks automatically

Peter Van de Lageweg
Contributor
January 4, 2017

In JIRA I want to automatically add a developer to a sub-task, I think this can be done in two ways with:

  1. When a (main) task/story/bug is assigned to a developer, all the sub-tasks are assigned to the same developer. 
  2. When the (main) task/story/bug is transitioned from status, all the sub-tasks are assigned to the person who triggered the transition.

However there is a problem with both ways. For the first method (which is preferable), the problem is that there is no option in JIRA Automation that support to automatically assign a sub-task to the same assignee as the parent task/story/bug. Or am I missing something?

The second method is problematic because in my case it's not the person who triggers the transition, but it's Bitbucket (by creating a branch or creating a Pull request). JIRA automation does not recognise this, and therefore doesn't assign a developer to the sub-task(s).

Do you have any suggestions on how I can setup JIRA Automation for this?

Thanks in advance!

 

4 answers

1 accepted

8 votes
Answer accepted
Nick Menere
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.
January 4, 2017

Hey Peter,

This should be fairly easy to do and as you mention the first is preferable (and the only way to do it Automation for JIRA).

Currently, the Edit Action is more powerful than the Assign Action and it has an option to copy the assignee from the parent.

I'd create a rule that looks like:

image2017-1-5%2012%3A0%3A33

image2017-1-5 12:0:33.png

This rule is made up of:

  1. A trigger that listens for updates to the Assignee field
  2. A "Related Issues" action that branches for all Sub-tasks
  3. Then an "Edit Issue" action that assigns the issue to the value in the parent.

You can use Conditions to restrict what kind of issues this is done for.

 

Let us know how you go.

 

Cheers,

Nick

 

 

Peter Van de Lageweg
Contributor
January 4, 2017

Thanks, this works perfectly!

David Sumlin
Contributor
April 24, 2017

Nick, I don't see that "Copy from Parent" drop down in my Edit Issues Component.  What am I missing?

andreas
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 25, 2017

Hi David,

Can you post a screenshot please of what your 'edit issue' action looks like? Also can you ensure you are running the latest version of Automation for JIRA please (if you are in server)?

Cheers,

  Andreas

Denise
Contributor
January 27, 2021

How did you get to #2  A "Related Issues" action that branches for all Sub-task

Thanks

Denise 

Rahul Savaikar
Contributor
May 2, 2022

Hello @Nick Menere ,

The option you provided works well in a straight forward scenario.  However, I need your assistance in another scenario.

Considering a slightly different scenario, where the assignee is now copied to the Sub-task from the parent, but the automation rule has to do it only once.

Meaning, the rule should apply to the Sub-task only once. The next time when the parent issue assignee changes, the sub-task should not pick that value, and keep the current assignee value intact. Is this possible at all?

Best Regards,

Rahul Savaikar

RP
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 27, 2023

I know it's a bit late, but for future reference:

It is possible if you want to accomplish this task on creation of the subtask by simply using another trigger, i.e. "Issue created"

0 votes
Goolam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 21, 2022

Hello I am hoping someone can assist me with this rule. I am fairly new to automation 

I am not sure why this rule is not working for me.

 

Screenshot 2022-12-21 at 13.33.55.png

 

I am expecting the subtasks below to be populated with the assignee of the parent 

 

Screenshot 2022-12-21 at 13.36.09.png

 

 I would appreciate any assistance as to how I can get this automation to work.

0 votes
Laura_Courtney August 13, 2019

Nick - I have created (and Published) the same exact rule as above, but when a dev creates a sub-task in an existing task, the sub-task is still not assigned to the dev (as the parent). The sub-task is still assigned to the project lead.

Any ideas?

Thank you.

Nick Menere
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.
August 13, 2019

If the assignee is not on the Create screen it may cause issues and not assign correctly. Is the assignee on the create screen?

Cheers,

Nick

Laura_Courtney August 15, 2019

Thank you Nick!

The Task is assigned to Dev1 at some point in the project. Later, Dev1 is creating technical Sub-tasks within the above named task, but the sub-tasks do not get assigned to Dev1, they get assigned to the project lead (me).

I'm not sure what Create screen you are referring to. 

0 votes
Laura_Courtney August 13, 2019

jira.pngI hope this helps...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events