Forums

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

Automation rule with active sprint

Aurélie Pilette
Contributor
March 18, 2025

Hello,

I created a field named "Sprint created".

I would like that this field is equal to the active sprint by an automation rule when issue is created.

The problem is that i have each time several sprint which are opened : 

- Bug

-sprint00.00

- TMA

The field must be equal to the open sprint which begin by "sprint"

I know how to create an automation rule. But I don"t know how to build it in order to have the good value

2 answers

2 votes
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.
March 18, 2025

Hi @Aurélie Pilette 

It appears you want newly created issues in the project to "remember" which sprint was active when they were created.  Is that correct?

What problem are you trying to solve by doing that?  That is, "why do that?"  Knowing that may help the community to suggest relevant ideas.

Until we know that...there are several ways to do what you asked:

What do you want to do if there is no "active" sprint when the issue is created?

Kind regards,
Bill

Aurélie Pilette
Contributor
March 19, 2025

Hi,

it is not exactly what I want. bcause i have not one active sprint. I have always three active srpint on my project.

What I want is : "active sprint and the active sprint must begin by sprint."

What i don't find is how to condition "My active sprint must begiin by sprint."

Do you know how can I condition by the sprint name on automation rule ?

 

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.
March 19, 2025

I understood what you asked, and the solution I described would meet that need.

 

Assuming the use of the Lookup Issues action with this JQL:

project = yourProjectKey AND sprint = "sprint" AND sprint IN openSprints()

Each issue in the results would contain the matching issues.  But they could have been in multiple sprints, and so the name of the "active" one must be extracted and compared your sprint name prefix.

{{#lookupIssues.first.sprint}}{{#if(and(equals(state, "active"), equals(name.toLowerCase().left(6), "sprint")))}}{{name}}{{/}}{{/}}

This would iterate over the values in the sprint field for the first issue, and for any active sprints where the name starts with "sprint", return the sprint name.

 

Please note well: successfully using automation rules requires learning and experimentation.  When something does not work as you expect, try using the Log action to write results to the log and incrementally adjust rules to learn what is happening and why.

0 votes
Matt Parks
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.
March 18, 2025

I'm not completely clear on what you want the automation rule to do. Are you saying that, when a new issue is created, you want to populate a new field with the value of an active sprint, but you're not able to determine which of the active sprints it should use?

What problem are you trying to solve by populating this field? 

Aurélie Pilette
Contributor
March 19, 2025

Hello,

The objective is to make a graph in order to have the bugs created vs bugs resolved in a sprint.

Like I don't find how to make the graph on Jira, I use Google sheet for the extract and looker studio for the graph.

2025-03-19_08h31_48.png

For the resolved is not a problem, i have already the field said in which sprint the bug was resolved.

But, I don't have the value of the sprint during the bug was created.

That's why I created a field : "sprint created" and I would like that the field will populate with active sprint.

My problem is that on my project, I have always 3 srpints active. 

So, that's why, I ask how to populate my field by the value : "Sprint active and the name begins by sprint."

Anyway, if you have an issue to have resolved vs created y sprint, I take it

Suggest an answer

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

Atlassian Community Events