Forums

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

What's the smart value for a Jira sprint in an automation rule?

Susan Cain August 4, 2025

Hello!  Below is a solution that I have tried. I have tried the original solution and the "it worked" suggestion, and I am still unable to assign an issue to a specific sprint.   Do you have any additional suggestions to get this to work?  I have tried both name and Sprint ID.  

https://community.atlassian.com/forums/Jira-questions/What-s-the-smart-value-for-a-Jira-sprint-in-an-automation-rule/qaq-p/2831771

2 answers

2 votes
Izabela França
Community Champion
August 4, 2025

Hello, @Susan Cain ! 

Could you share with us a screenshot of your automation rule, the value you're using in the Sprint field, and any errors or unexpected behavior you're seeing. 

This will help us better understand why the suggested solutions didn't work for you.

 

Susan Cain August 5, 2025

Rule is set up:

Automation Rule.pngWork Item is created, assigned to 2025.Q3.5 FS when I put the smart value as: {{sprint.name.match("New Stories Added - FINS").id}}

sprints.png

I updated the rule and it put the new work item into backlog

Automation Rule STTT.png

updated rule again to be {{sprint.("New Stories Added - FINS")}} - added work item, assigned to backlog

Automation Rule 3.png

It has to be something stupid simple that I am missing.  I appreciate your advise!

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.
August 5, 2025

Hi @Susan Cain 

Adding to the suggestions from @Izabela França ...

I note a few things with your rule that need adjustment.  But first:

 

What problem are you trying to solve?  That is, "why do this?"  Knowing that will help the community provide better suggestions.  What you seem to be trying is:

GIVEN a future sprint exists named "New Stories Added - FINS"
WHEN a work item is created
AND that work item's type is "Report Enhancement..."
THEN add that work item to the future sprint named "New Stories Added - FINS"

 

Until we know your scenario...

The Work Item Created trigger has a known racetrack timing problem.  This means the rule can start before all of the data is available, potentially leading to weird rule symptoms and errors.  Atlassian knows about this problem, and is making architectural changes to address it.  However, there is known timeframe for the fix.

And so my recommendations are:

  • Always add the Re-fetch Work Item Data action immediately after this specific trigger.  That will slow the rule slightly, reloading data before the rule proceeds.
  • Do not use the new feature to add conditions directly to this specific trigger trigger, as they could fail to match when expected.  Instead, add separate conditions after the re-fetch action.

 

Next, the smart value expression shown in the article you linked to cannot work as you expect.  The reasons for the rule you show are:

  • The additional fields section requires valid JSON, and what you show is not valid
  • When editing a work item, a specific field (e.g., Sprint) may be updated by selecting it from the dropdown list or with JSON, but not both for the same field
  • This smart value expression {{sprint.name.match("New Stories Added - FINS").id}}
    • Returns a list of sprints filtered to the name attribute in the current work item
    • Filters them using the match() function
    • And then returns nothing: the id is not available after filtering to the name attribute

 

Putting all that together, and if the scenario is as I described, your rule will need to either hardcode the id for that specific sprint, or use the REST API to find the sprint to add it.

 

Kind regards,
Bill

0 votes
Vitalii Rybka
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.
August 4, 2025

Hi @Susan Cain,

Here are a few troubleshooting steps for sprint assignment automation:

Common Smart Values for Sprints:

  • {{sprint.name}} - for sprint name
  • {{sprint.id}} - for sprint ID
  • {{issue.sprint.name}} - current issue's sprint name

Things to Check:

  1. Sprint State - Make sure the target sprint is in "Active" or "Future" state (closed sprints can't accept new issues)
  2. Board Association - The issue's project must be associated with the board containing that sprint
  3. Smart Value Format - Try wrapping in quotes: "{{sprint.name}}" or use the exact sprint ID as a number
  4. Field Mapping - In the "Edit Issue" action, make sure you're using the "Sprint" field (not a custom field)

Alternative Approach: Try using the "Sprint" field with a static value first (just type the sprint name directly) to test if the automation works, then switch back to smart values.

Debug Tip: Add a "Log Action" before the sprint assignment to see what value {{sprint.name}} is actually returning.

Could you share a screenshot of your automation rule setup? That would help pinpoint the exact issue.

Feel free to DM me if you need more detailed troubleshooting help!

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