Automation Rule: Link multiple recently created stories within the same epic

Andi Klaeusli April 11, 2023

Dear community,

I intend to link multiple recently created stories of the same epic, thereby ensuring that all of these stories follow a sequential workflow. In other words, Story B cannot be started before Story A has been completed, etc. To this end, I'm trying to create an automation rule which seeks to block Story B until Story A has been finished ("Story B blocks Story A"/"Story A is blocked by Story B"). The rule is triggered when a new issue has been created. Then, a condition checks if the new issue type equals a "story" and if the issue's summary contains a particular substring (=Story B). (see print-screen)

 

issue_2.png

While the trigger and the conditions run smoothly, the Branch JQL, by which I'm looking for the Story B within the same epic as Story A, does not work. It seems as if the parameter "parent" causes the trouble, at least according to the error message in the audit log:

issue_4.png
I've already tried to spare the quotation marks or to use a created smart value variable in the JQL query instead of the smart value, but to no avail.
What do I miss here? Do you have any general suggestions how to approach this task of linking stories or do you have any specific suggestions which "bring this automation rule to life"? 
Thank you in advance for your advice and support!

2 answers

2 accepted

1 vote
Answer accepted
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.
April 11, 2023

EDITED!

 

Hello @Andi Klaeusli 

Welcome to the community!

Are you working with issue in a Company Managed project or a Team Managed project?

If you are working with issues in a Company Managed project then change your JQL thus:

from: parent = {{triggerIssue.epic.key}}

to: "Epic Link" = {{triggerIssue.Epic Link}}

 

If you are working with issues in a Team Managed project then change your JQL thus:

from: parent = {{triggerIssue.epic.key}}

to: parent = {{triggerIssue.parent}}

Andi Klaeusli April 11, 2023

Thank you for your response which is highly appreciated.

It is a Team Managed project I've working on.

I've just run the rule with the adapted JQL query resulting in the following error message:

issue_7.png

issue_5.png

If I get rid of the quotation marks encompassing the suggested smart value, I receive an error as well:

issue_6.png

0 votes
Answer accepted
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 11, 2023

Hi @Andi Klaeusli -- Welcome to the Atlassian Community!

@Trudy Claspill helped you with the branch part of your rule, and I wanted to ask about your overall scenario...

You describe:

  • there is an epic,
  • with multiple recently created stories, and
  • for which there is a dependency ordering among the stories,
  • which you are enforcing with blocking links between issues.
  • And from what you show, I hypothesize that you have multiple rules created to implement that ordering by finding the predecessor issue and linking to it...one by one in the dependency chain.

Does that all sound correct?

If so, how are you creating those multiple stories: manually, with an import, with another automation rule, etc.?

Kind regards,
Bill

Andi Klaeusli April 11, 2023

Hi @Bill Sheboy 

Thank you for your questions and your interest in my case.

You summarised everything correctly. The same is true for your assumption. I've indeed chained two (if this one runs three) automation rules. Once the user creates a new Epic the first rule creates the mentionned multiple stories (8 stories). The creation of the latter triggers the second rule which assigns several different sub-tasks (5 to 13) to each of the recently created stories. The rule in question, the third rule, finally seeks to enforce the dependency ordering between the stories, as you rightly pointed out.

In the beginning, I intended to pack everything in one rule. But I realised that this would make the debugging more challenging, let alone the fact that I would exceed Jira's limits of about 60-70 steps per rule. Thus, I decided to split them into three, easier manageable rules. 

I also spent some thoughts on creating an epic template consisting of all the stories, sub-tasks and the correspondent linking as well as the parent-child relations. As far as I've researched I then could "deep clone" the template using one automation rule. What do you reckon?

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 12, 2023

Thanks for confirming the scenario.

I was wondering how you were creating the issues with different rules, apparently triggered on the same thing but searching for different summaries, and so could definitely collide in timing...and as a result fail to link as you wish.

Even though it may be more difficult to maintain, if you can at least create all of the stories in one rule linearly, the links will be as you expect consistently.  (The new duplicate rule component feature can help create this rule quickly.) Then use different rules to create any subtasks to stay under the maximum limit for rule size.

Andi Klaeusli April 17, 2023

Thank you @Bill Sheboy 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events