I want to get the name of last sprint name created in board which is in open status for Automation

amehar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 2, 2024

I want to add the name of last created sprint in Summary of issue that will be created using Jira automation. A board has sequence of sprint names like Sprint 1, Sprint 2.... , I am creating a automation to create set of issues whenever new sprint is created. Board is having multiple sprints - 1 Active and many open sprint for future,  I wanted to fetch the name of lastly created sprint so that I can add it in summary of issue,
For Eg: 
Sprint 1 -Active
Sprint 2 - Open
Sprint 3 - Open
Now when I am creating another Sprint in Board as Sprint 4- automation will create few predefined issues. In one issue I want to use name of last Sprint that was created in this Case "Sprint 3" in summary of issue.

1 answer

0 votes
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 2, 2024

Hi, 

When you use the create sprint completed/created/started trigger you can use the {{sprint.name}} smart value. 

Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 2, 2024

Note if you have an issue of a previous sprint, you can use:

{{issue.sprint.name}}

To get the sprint name of that 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.
July 2, 2024

Hi @amehar -- Welcome to the Atlassian Community!

Adding to Rudy's suggestions...

You describe a rule which may look like this:

  • trigger: Sprint created
  • action: create issue
  • action: create issue
  • ...

As Rudy notes, for the Sprint Created trigger, the {{sprint}} smart value is the one just created based upon the trigger.  And so {{sprint.name}} may be used in the Summary when creating the issues.

Kind regards,
Bill

Like Rim Repko likes this
amehar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 2, 2024

Thanks for the answers. I am using the Sprint as trigger , Action as create issue , First issue is getting created and {{sprint.name}} is correctly fetched in summary.
Now my problem statement is I want to use the name of last sprint that was created in the board in summary of the second issue to be created as create issue action in the rule. Please refer to the image below.
Capture.PNG

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.
July 4, 2024

If you mean getting the sprint created immediately before the one in the trigger, that is more difficult.  Using some assumptions you might be able to reduce that difficulty...

 

If you assume there are issues assigned to that prior sprint, you could use the Lookup Issues action with JQL, and get an example issue's value for the sprint.  The JQL could be:

project = yourProject AND sprint IS NOT EMPTY ORDER BY sprint DESC

And then the name you want would be:

{{lookupIssues.first.sprint.name}}

This works if that issue has one-and-only-one sprint assigned.  Smart value, list filtering will be needed otherwise.

 

If there are no issues assigned to that prior sprint, you would need to call the REST API to get all sprints for the board, using the Send Web Request action.  And then using a combination of created variables and smart value, list filtering, extract the name.

Like amehar likes this

Suggest an answer

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

Atlassian Community Events