Forums

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

automatically complete the current sprint and start the next one

Njcovich
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!
February 27, 2026

Hi everyone. I have a question. On Monday at 8 AM, I don't want to manually end the current sprint and start the next one. Right now, the old sprint ends, but the new one doesn't start automatically. What should I do?

1 answer

4 votes
Trudy Claspill
Community Champion
February 27, 2026

Hello @Njcovich 

Welcome to the Atlassian community.

What version of Jira Data Center are you using?

I found this documentation for automatically stopping and starting sprints:

https://confluence.atlassian.com/jirasoftwareserver/configuring-a-sprint-to-auto-start-and-auto-complete-1235848794.html

I recommend that you review the details of your configuration comparing that to the information in the document to make sure you have it configured correctly.

Since your sprints are automatically stopping, I would conclude that you have set the Auto stop/start option for each sprint you are creating.

Do you have a start date specified for every sprint?

Does the sprint that did not automatically start show the "auto managed" lozenge in the Backlog view?

Novak Jocovich
March 4, 2026

Oh, thank you so much, I'll try.

Like Trudy Claspill likes this
Trudy Claspill
Community Champion
March 4, 2026

Let us know how that turns out, or if you have more questions on this problem.

Novak Jocovich
March 4, 2026

Ok!

Novak Jocovich
March 11, 2026

It seems that our sprint creation interface is different and there is no "Start and end sprint automatically" checkbox.

Novak Jocovich
March 11, 2026
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.greenhopper.service.sprint.SprintService
import com.atlassian.greenhopper.model.sprint.SprintBuilder
import java.util.Date

 

def sprintService = ComponentAccessor.getComponent(SprintService.class)
def closedSprints = sprintService.findClosedSprints()*.sort { it.endDate }.reverse()
if (closedSprints.size() > 0) {
    def lastSprint = closedSprints.first()
   
    def numberPart = lastSprint.name =~ /(\d+)$/
    if (numberPart.matches()) {
        int nextNumber = Integer.parseInt(numberPart.group(1)) + 1
       
        def newSprintName = "Unity ${nextNumber}"
       
        def startDate = new Date()
        def endDate = startDate + 7 
       
        sprintService.createSprint(
            new SprintBuilder()
                    .name(newSprintName)
                    .startDate(startDate)
                    .endDate(endDate)
                    .build(),
            boardId // 1370 id board
        )
    }
}
Tell me what I'm doing wrong?
Trudy Claspill
Community Champion
March 11, 2026

What version of Jira Data Center are you using? You can get that from the Help > About option. It also appears in the footer of many screens.

The documentation I linked was for the latest version - 11.3.

As for the code you showed, how are you trying to execute it and what is the result?

Novak Jocovich
March 12, 2026

Jira Project Management Software (v10.7.4) 

Suggest an answer

Log in or Sign up to answer