Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create issue in next sprint only if it doesn't already exist

Lord Pablo February 9, 2024

I've got a simple rule which creates a new task in the following sprint when a certain task is moved to "In Progress" in the current sprint. This rule works just fine.

My problem is that if the triggering task is moved to any status other than "In Progress" and then back to "In Progress", the rule will create another task in the next sprint. 

In other words, my first task is working as written; however, I want to add a condition that if the created issue still exists in the next sprint, another task should not be created.

Example: We have a task name (summary) of "Deploy to Development". We have one of these tasks each sprint as we deploy our release each sprint. 

When "Deploy to Development" is moved from "To Do" to "In Progress", my rule creates and identical "Deploy to Development" task in the next sprint. I am not cloning the task; I'm using "Create a new".

If, for some reason, someone moves the current sprint "Deploy..." task out of "In Progress" and then back to "In Progress", the rule correctly creates another "Deploy..." task in the next sprint. I will now have two of them in the next sprint, but I only want one.

I don't want to use the "Clones" link. I was hoping to say something like, "if futureSprints() contains a task with summary = 'Deploy to Development', then don't do anything."

Rule screen 1.JPGRule screen 2.JPG

Are there any suggestions?

1 answer

1 accepted

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.
February 9, 2024

Hi @Lord Pablo 

You could try adding a Related Issues Condition, with JQL to check if there are no issues which are in futureSprints() which match your summary.  For example:

project = yourProjectName 
AND sprint IN futureSprints()
AND summary ~ "\"Deploy to Development\""

This is checking for the specific phrase "Deploy to Development" in the summary, so please adjust as needed.

Kind regards,
Bill

Lord Pablo February 13, 2024

Appreciate the advice. It seems this is doing a positive check. 

In other words, if in the future sprint, a task with this summary exists

Then, do stuff.

I want the opposite. If in the future sprint, a task with this summary exists

Then, do nothing.

I'm just a few weeks into learning Jira automation, and I'm honestly trying my best.

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.
February 13, 2024

When using the Related Issues condition, you may select the criteria such as:

Screenshot 2024-02-13 095347.png

Lord Pablo February 13, 2024

Hold up. Possible "duh" on my part.

Condition: Are not present, etc... see it now.

Lord Pablo February 13, 2024

Haha, you posted as I was posting. Thanks!

Lord Pablo February 13, 2024

What threw me was that I did the "Related issues" JQL and the subsequent condition of "None match specified JQL" used the same exact JQL.

It works, but it reads weird.

JQL with none match.JPG

Like Bill Sheboy likes this
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.
February 13, 2024

I am glad to learn that works for you. 

Did that answer all of the questions for this one?  If so, please consider marking this one as "answered"; that will help others with similar needs find solutions faster.  Thanks!

Like Lord Pablo likes this

Suggest an answer

Log in or Sign up to answer