Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,246
Community Members
 
Community Events
165
Community Groups

Sprint Field: Only show Current Sprint

Edited

Do anyone know if the Sprint field can somehow be manipulated to only show ONE, current sprint value?

Right now it racks up all the Sprint values as it continues on in its lifespan of not being closed.

 

Obviously, we want to track the sprint history and it's important, but wondering if there is any way to “store” the previous/past/old/non-current sprints in a separate other field while only having the current sprint in the true sprint field or some other solution I might not be thinking of.

 

Slack image.pngCUS ticket.png

3 answers

2 votes

Jeffery,

We did something like what you're asking about by using automation for Jira.

We set up a trigger to run each time the Sprint field is updated we copied the last value of the sprint field to the custom field we created called "Last Sprint".

 

{{issue.sprint.last}}

 

Screen Shot 2021-01-05 at 3.57.06 PM.png

Out of interest, how do you handle the case where the sprint gets removed? It seems that {{issue.sprint.last}} grabs a random previously assigned sprint. 

One way I've found to do this is by using a custom field (Current Sprint in the example below) and automation. I chose to setup the Current Sprint field as a dropdown list but it may be simpler to set it up as a text field.

SprintAuto1.png
The automation is triggered by changes to the sprint value.

Then there's a safety filter to make sure I only do this on project T1.

Next use a smart value to iterate through the list of sprint names in the sprint field. In the example the sprint smart value is set to {{sprint}} and the variable name is set to CurrentSprint.

Note I used similar names for this variable and the custom field - I hope that's not too confusing.

The next step is to check if the sprint state is active. This is done with an advanced compare condition. The first compare value is {{CurrentSprint.state}}, the condition is equals, and the second value is active.

SprintAuto2.png

If that is true, then the next automation step is to edit the value of the custom field Current Sprint. Set it's value to the name of the sprint which is found in the smart value {{CurrentSprint.name}}.

SprintAuto3.png

Finally, to take care of cases where an issue is moved out of the active sprint, then we setup another if JQL which checks that the issue has either an EMPTY value for sprint (which happens when it's moved into the backlog), or the issue is not in opensprints(). We want to set the Current Sprint field to None in this case which is done using another edit issue field step to set the Current Sprint custom field to the value None. 

SprintAuto4.png

There's so many threads from people asking about this I thought I'd try to help with this post. I just got this working but if I find any issues I'll provide an update. 

Note: I've only made this work for single projects having a single active sprint. It may need modifications if there are multiple active sprints in the issue set going into the automation.

I learned that another rule is needed to set the current sprint when a new sprint starts. This can be done using a rule that triggers at sprint start. SprintAuto5.png

Note that it's important to setup the For issues in the sprint branching because the trigger requires it and will error if it's not there.
Last set the sprint name customer field, TCurrentSprint in this example, to the smart value {{Sprint.name}}.

Maybe it is off topic but i would like to create JQL for issues which are only from current spirnt by value in sprint field. But disregard issues which were unfinished in last sprint and moved to current (where sprint field will have two values of sprint)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,092 views 34 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you