Jira Automation: Linking automatically created subtasks with each other.

Jürgen Heckmann April 22, 2022

Hi everyone!

I'm now struggeling for a while with a certain automation:

 

I automated process where several subtasks get created under the trigger task. 

I now want to link each subtask only with the one before and set it to "has to be done before"

Like: Subtask 1 --> Subtask 2 --> Subtask 3 etc.

I already found a similar question   of another user here but the outcoming result links all subtasks with each other.

Also: I can only link issues to the trigger or recently cerated issue. Neither to a smart-value nor to a key. Is this normal behavior? 

Screenshot 2022-04-22 105230.png

 

Thanks for your thoughts and ideas!

 

- Jürgen

1 answer

1 accepted

1 vote
Answer accepted
Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2022

Hello @Jürgen Heckmann 

To link the sub-tasks, you will need to set the linkage in the Automation rule for all sub-tasks except the first one. Please refer to the below screenshot for reference.

Note: In my environment, the required link type is not available and hence, I have used a different one.

Please feel free to share any queries.

Kindly accept the answer if this helps resolve the scenario.

Linked Sub-task.PNG

Jürgen Heckmann April 22, 2022

Hi @Gaurav ,

Thank you for your fast reply. This was my inital solution idea aswell.

Unfortunatelly, this runs into the following error:

Screenshot 2022-04-22 131944.png

The error confuses my since I can manually link the tasks once they are created.

 

My task creation looks like this:

Screenshot 2022-04-22 132108.png

Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 25, 2022

Hello @Jürgen Heckmann 

This is interesting and odd but something which I have experienced previously!!

I can think of a couple of ways to check this out:

  • I would suggest setting the 'Linked Issues' field before setting other fields
  • Alternatively, adding the action for 'Re-fetch issue data', before creating the sub-task

Kindly try these alternates and share your input. I would be really interested to see how it works out for you.

Like Jürgen Heckmann likes this
Jürgen Heckmann April 25, 2022

Hi @Gaurav ,

Thank you for your ideas. Unfortunatelly it didn't help. But I figured out how to solve it:

Apparently in the Create-Task Automation Component only fields can be acessed, which are also available in the corresponding Screen for creating tasks manually. 

Once I added the "Linked Issues"-Field to the screen (see screenshot) the automation worked. 

Screenshot 2022-04-25 162149.png

 

I now run into another but much smaller issue. It seems that during an if-condition created subtask is not being considered as "recently created issue" but the last task before the condition. 

 

Here is my Automation:

Screenshot 2022-04-25 162014.png

All "create a new subtask" actions in the if conditions are not considered but a link to the last subtask before the condition starts, is created.

the automation scheme (with the occuring error) looks like this:
ST-SCHEME.png

 

Do you have an idea how to solve this issue?

Bill Sheboy
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, 2022

Hi @Jürgen Heckmann 

That appears to be a known behavior: the {{createdIssue}} and {{createdIssues}} contexts are not updated in the main flow when an issue is created within a conditional part of the rule:

https://codebarrel.atlassian.net/browse/AUT-1090

Kind regards,
Bill

Like Jürgen Heckmann likes this
Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 25, 2022

Thanks @Bill Sheboy  for sharing the details!!!

@Jürgen Heckmann  as Bill mentioned this is known behaviour. I can suggest breaking the rule into parts and triggering the subsequent part from the previous one. This is something which I have tried and relies on the logical condition used for breaking and triggering.

Hope this helps!!

- GG

Like Jürgen Heckmann likes this
Jürgen Heckmann April 26, 2022

Hi @Gaurav  and @Bill Sheboy ,

Thank you for your good support! I will then create a workaround as suggested!

Kind regards,

Jürgen

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer