Add Subtasks to a issue when a sub task on another issue is done

Sarah Isaacs
Contributor
March 19, 2024

Hi 

Please can you help. I have an Automation that does this:

When Transitioned from To Do to Done

  • If the Sub task matches - Decide Which Synopsis

For the Parent

  • Create a new issue in the same project - summary - {{issue.epic.summary}} - Writing C2
  • Create a sub task - {{issue.epicLink}}

For the Parent

Then Transition the completed issue Writing C1 to done.

 

Its not working as the sub task does not create on the newly created writing card 2? I have tried - {{createIssue.key}}

 

Please can someone help? I've tried so many ways to do it.image.pngimage.png

 

1 answer

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 19, 2024

Hello @Sarah Isaacs 

As the rule is currently written, at the point where you create the new Subtask it is the Parent of the trigger issue that is "in focus" so the subtask will be created under that issue.

If you want the new Subtask created under the newly created Writing issue then you can change the Parent of that subtask to the newly created issue within the Create Issue action for the Subtask.

Screenshot 2024-03-19 at 11.12.46 AM.png

 

Sarah Isaacs
Contributor
March 19, 2024

HI @Trudy Claspill 

 

Thanks for coming back to me so I have tried as you have suggested. I had tried something very similar but had put {{createissue.key}} not {{createdIssue.key}}. So I was super hopeful. But it still doesn't work? I don't understand why I get an error creating issue. image.png

 

Any help would be amazing thanks so much as you know because you've answered my questions before I'm still quite new to this.

Thank you

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 19, 2024

Can you who the details of your rule after the updates and the details of the step for creating the subtask?

In your original image I see that your subtask creation task is naming a specific project.

Screenshot 2024-03-19 at 11.52.19 AM.png

 

Is that the same project where the preceding new issue was created?

Screenshot 2024-03-19 at 11.53.26 AM.png

The subtask has to be in the same project as its parent task.

 

Sarah Isaacs
Contributor
March 19, 2024

Hey Trudy 

It works, It works . Thanks a million. One missing letter.

Thank you

Like # people like this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 19, 2024

Great!

If your problem has been solved with the help of my responses then please consider clicking the Accept Answer button.

Sarah Isaacs
Contributor
March 22, 2024

@Trudy Claspill  Sorry to come back to you but I have another question on this please? So I have created one sub task to be the child of the new task I created as per above using the smart value --{{createdissue.key}}--.

The problem is I want to create 4 more sub tasks that would have the same parent - the newly created task. So I added another Create new Action and added the Smart Value again --{{createdissue.key}}--.

I get a can't create issue error. 

Now I think this is because the created issue key is referring to the first sub task I created? 

So how do I fix this please?

 

Thanks so much

Sarahimage.pngimage.pngimage.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2024

You could use the Create Variable action to create a separate variable to store the issue key of the first created issue. Then use that variable in the creation of the subtasks.

Screenshot 2024-03-22 at 7.31.01 AM.pngScreenshot 2024-03-22 at 7.31.51 AM.png

Sarah Isaacs
Contributor
March 22, 2024

@Trudy Claspill You are so clever this is amazing. thanks much. So there is one more thing this automation needs to do.

Which is to transition the new writing C2 card to the Storyboard column and the writing C1 card to Done.

I've got the c1 Card going to Done. Its the newly created card I can't transition.

This to be honest it part of my work around as I can't access the sprint, as we talked about in a previous question. So instead I send an email to the Team Leader to ask them to move the issue manually from the backlog to the sprint. It would be great if they didn't have to also move it to the right column. 

Is that possible? Your advise is amazing thank you.

 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2024

The ideal solution would be to branch to the newly created issue. Unfortunately you can't nest a branch within a branch.

Creating a separate branch in the main line of the rule to branch to the newly created issue is also not a good option because Branches may execute in parallel rather than sequentially. Setting up another branch to the newly created issue could result in that branch running before the new issue is actually created.

So, my advice is to do something like add a special label to the new issue as you create it. Then create a separate rule, triggered on Issue Created, add a Condition to look for that special label value, then have an Action to transition the issue, and then an Edit action to remove the special label.

There might be another way to accomplish it all in the first rule, but I know the above suggestion will work.

Sarah Isaacs
Contributor
March 25, 2024

hey @Trudy Claspill  So I've tried this. But no luck.

Here is what I have done and tried. I have a label field on the Issue type writing.

I have added the labels to my create issue on automation 1 (the automation that creates the issue and the sub tasks). See the image. I called my label Rhino_column_Storyboard

I then created a second automation as you suggested. With the trigger created issue, this didn't work. The automation never seemed to be called. So I have tried a values changes trigger.

Nothing seems to work is it because its creating the new issue and its in the backlog and not on the board, as I can add it directly to the sprint, or is it me doing it wrong please? Thanks so much

image.png

image.pngimage.pngimage.png

 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2024

For the second rule you need to go to the Rule Details page and check the box below Actor for "Check to allow other rule actions to trigger this rule."

Screenshot 2024-03-25 at 1.32.10 PM.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events