Jira Automation Rule - Create Sub Task only when Story in Active Sprint and don't create duplicate

Keyun Mistry May 22, 2024

I'm trying to build a rule for our Sprint team where when issue moved to Active Sprint, then it creates a Subtask.

Now I wanted to make sure that if issue move back to backlog and when it bring it back to Active Sprint again AND if subtask exists then I don't want rule to create a duplicate sub task again. 

How can I do that. I was able to build a rule that will create sub task but I'm struggling on doing validation of Parent ticket to see if specific sub-task exist then don't create a ticket again. 

Any help greatly appreciated. 

1 answer

1 accepted

0 votes
Answer accepted
Kalyan Sattaluri
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.
May 22, 2024

Hello @Keyun Mistry 

Please share screenshot of your rule so we can help. But generally you can just do a:

  • If -> smart value condition,
    • {{issue.subtasks.size}}
    • GREATER THAN
    • 0
  • If -> smart value condition,
    • {{issue.subtasks.summary}}
    • DOES NOT CONTAIN
    • "your string"

Only then create your subtask.

But share your current rule so community can help.

Thanks!

Keyun Mistry May 22, 2024

Hi @Kalyan Sattaluri 

I tried what you said above and it didn't work. Here is my setup. Basically, I have a Story that start with "Validate - xxxx" and when it gets assigned to Active Sprint, then I wanted this rule to create Sub Task and make sure that we don't create duplicate if there is already subtask exists with "validate" as Summary of Subtask. I hope this help. 

Rule.JPG

Kalyan Sattaluri
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.
May 22, 2024

Hello @Keyun Mistry 

 Did your sample issue already have a sub-task or no?

Either way, looking at the rule, you can remove the {{issue.subtasks.size}} > 0 check...

Because it will only create if any of subtasks dont have "Validate" string in it..

And leave your other checks in place and run your rule.. and share your findings..

Thanks!

 

 

 

Keyun Mistry May 22, 2024

Hi @Kalyan Sattaluri 

No at first it will not have a subtask but my goal is to create one when Story get assigned to the Active Sprint only. 

here is what I wanted to build. 

IF -> Sprint in openSprints() -- Active Sprint

  • Story summary start with Validate
  • No subtask where Summary like Validate
  • THEN create a subtask ticket

ELSE

  • Do nothing

 

 

Kalyan Sattaluri
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.
May 22, 2024

Right, as mentioned earlier, in your rule, just delete the step which checks the size and rerun, It should work.

 

{{issue.subtasks.size}} > 0  <<-- DELETE THIS CHECK and leave everything else. 

Keyun Mistry May 22, 2024

Perfect. It worked @Kalyan Sattaluri Thanks for your help. 

Here is the final setup. 

RuleResolved.JPG

Like Kalyan Sattaluri likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events