# Feature AGILE-27 - Introduce sprints and replace versions in current backlogs view

Project: Stream agile
Status: closed
URL: https://community.openproject.org/work_packages/AGILE-27

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Target versions | 17.3.0 |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

| ID | Subject | Status | Decision |
| --- | --- | --- | --- |
| AGILE-37 | Do we need automatic scheduling for sprints? | decided | No automatic scheduling for now. |
| AGILE-38 | How do we handle the work packages of shared sprints? | decided | We have to filter it down by the active project that we are in. So only show the work packages of a Sprint for the current project. |
| AGILE-39 | Sharing active Sprints potentially leading to a multiple active Sprints per project | decided | With the project based settings, there shouldn't be the case any more that multiple active sprints exist within the project. This will probably change later. |
| AGILE-40 | Can users stop a Sprint? | decided | No "stop" status - sprints should be able to be completed  even before the set finish date |
| AGILE-59 | Required permissions for adding/removing work packages from a sprint | decided | There is a permission for this: "Mange sprint items" |
| AGILE-68 | What are the paradigms when migrating versions? | decided | Assumptions in description accepted |
| AGILE-69 | Is sprint sharing "No sharing" the default? | decided | "No sharing" is the default and sharing options are copied (template use case). |
| AGILE-73 | Showing no longer shared sprints | decided | The behaviour is accepted. There will for now be now limitation on left-over sprints. |
| AGILE-81 | Instance sharing setting in 17.4 | decided |  |

## Features and Chunks

| ID | Subject | Type | Status | Assignee | Target versions | Spent time |
| --- | --- | --- | --- | --- | --- | --- |
| AGILE-41 | Create Sprint model | Implementation | closed |  | 17.3.0 |  |
| AGILE-42 | Update existing backlogs view to use the new model | Implementation | closed |  | 17.3.0 |  |
| AGILE-43 | Migrate Versions to Sprints | Implementation | closed |  | 17.3.0 |  |
| AGILE-44 | Automatically generate Sprint name sequence & create Sprint modal | Implementation | closed |  | 17.3.0 |  |
| AGILE-45 | Migrate and rework Sprint permissions | Implementation | closed |  | 17.3.0 |  |
| AGILE-57 | Allow sharing Sprints with other projects | Implementation | closed |  | 17.3.0 |  |
| AGILE-62 | Start and finish date should be mandatory for active sprints | Implementation | closed |  | 17.3.0 |  |
| AGILE-71 | Create feature flag | Implementation | closed |  | 17.3.0 |  |
| AGILE-87 | Limit sprint creation based on project's sharing settings | Implementation | closed |  | 17.3.0 |  |
| AGILE-89 | Make drag and drop work between sprints and version-backlogs | Implementation | closed |  | 17.3.0 |  |
| AGILE-90 | Add dependency between on 'assign_versions' to 'manage_sprint_items' | Implementation | rejected |  | 17.3.0 |  |
| AGILE-91 | Backlog selection dropdown that lets you select versions to display | Implementation | rejected |  |  |  |
| AGILE-93 | Reset the project sharing settings when disabling the backlogs module | Implementation | closed |  | 17.3.0 |  |
| AGILE-94 | Reset the project sharing settings when archiving the project | Implementation | closed |  | 17.3.0 |  |
| AGILE-112 | Allow Stories in Sprints to be repositioned | Implementation | rejected |  | 17.3.0 |  |

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Spent time | Module |
| --- | --- | --- | --- | --- | --- | --- | --- |
| AGILE-123 | Bug | Cannot set the "Used as backlog" field in the Project Version settings. | closed |  | 17.2.2 |  |  |
| AGILE-164 | Bug | Sprint not correctly rendered in pdf export | closed |  | 17.3.0 |  | Modules and project features / Export / PDF Export, Modules and project features / Backlogs |
| AGILE-143 | Bug | Sum of work packages and their story points in sprint header does not respect project boundaries | closed |  | 17.3.0 |  | Modules and project features / Backlogs |
| AGILE-125 | Bug | Sprints in a Parent project display work packages from Child project | closed |  | 17.3.0 |  |  |
| AGILE-86 | Bug | Sharing permission dependencies are not migrated | closed |  | 17.3.0 |  |  |

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Modules and project features / Backlogs, Modules and project features / Project settings |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups | https://www.figma.com/design/yRewu4Y5nuWCa8aMM3DFw3/Agile--Sprints-and-Backlogs?node-id=1062-25614 |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Jens Ulferts |
| Product manager |  |
| Developers | OP Dev Polaris Team |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**As** a user following scrum methodology  
**I want to** have sprint objects connected to work packages  
**so that** I can group work packages by sprints in which they are worked on, and easily reorganise sprints by moving items between them (and the backlog)

**Acceptance criteria**

- [x] Sprints exist in OpenProject. They have
  
    - a name (plain text) - same across all shared with projects
      
        - we automatically set a name when a user creates a sprint bucket "Sprint 1"
      
        - user can overwrite the name
      
        - for each new bucket we count +1 based on the latest sprint bucket, copying the text part of the sprint name used for the latest sprint, e.g. the one edited by the user
      
        - if user removed the digits in all sprint names in planning, we stop counting
  
    - a start and a finish date (dates) - same across all shared with projects
      
        - These dates are mostly optional. Their presence is required and validated when the sprint is about to be started or active.
  
    - a status - same across all shared with projects. The list of status is a fixed set:
      
        - In planning
      
        - Active
      
        - Completed

- [x] The user can connect a work package to a sprint. Multiple work packages can be associated with a sprint.
  
    - For now, this is only possible within the Backlog module. <mention class="mention" data-id="71061" data-type="work_package" data-text="##71061">\#\#71061</mention> will add an editable and manageable "sprint" field to work packages.
  
    - The "sprint" property is journaled.
  
    - Work packages have a "position" field to remember the order within the sprint. This field already exists and is left untouched.

- [x] Sprints will later on be exposed via an API (see <mention class="mention" data-id="71058" data-type="work_package" data-text="#71058">#71058</mention> and <mention class="mention" data-id="71061" data-type="work_package" data-text="#71061">#71061</mention>)

- [x] Versions are no longer used by the existing Backlogs module. Sprints are used instead.
  
    - Only the left hand part of the backlogs main view will use sprints. Backlogs (currently displayed to the right) will continue to use versions (subject to change later).
  
    - The button reading "+ Version" is changed to "+ Sprint" and [opens the sprint creation form](https://www.figma.com/proto/yRewu4Y5nuWCa8aMM3DFw3/Agile--Sprints-and-Backlogs?node-id=416-9277&p=f&t=6CQJQUzsbb0dlgvl-0&scaling=min-zoom&content-scaling=fixed&page-id=142%3A13148) (the header of the modal: "Create sprint").
  
    - The "Properties" menu entry in the sprint menu will lead to the sprint edit form.
      
        - Will be renamed to "Edit sprint"
  
    - The "Wiki" menu entry from the sprint menu is removed
  
    - The "Stories/Tasks" menu item will be removed (later on possibly readded by <mention class="mention" data-id="71061" data-type="work_package" data-text="#71061">#71061</mention>).
  
    - The version form no longer has the "Column in backlogs" select field. Instead a "Used as backlog" checkbox is displayed.
  
    - The limitation on the work package type (which type qualifies as a user story, which one is a task) remains unchanged (for now).
  
    - The task board will use the sprint
  
    - The burndown chart will use the sprint

- [x] Sprints can be shared
  
    - Sharing is a project-level setting, not a sprint-level one (as is the case with versions at the moment). Users can choose in the project settings:
      
        - Share sprints - Sprints can be created in this project (enable/disable). Sprints created in the project are then shared with either (user selection):
          
            - All projects
          
            - Subprojects
      
        - Receive shared sprints - No sprints can be created within this project. Instead shared sprints are used.
      
        - No sharing - Sprints can be created in this project. None of the created sprints are shared with any other project
          
            - This is the default setting for projects
  
    - Only one project in the instance can "Share with all projects".
      
        - In the scope of <mention class="mention" data-id="71890" data-type="work_package" data-text="###71890">\#\#\#71890</mention> those sprints are moved to the global backlog module.
  
    - Sprint sharing is only possible if enabled first in the instance administration *(only in 17.4) (See <mention class="mention" data-id="72775" data-type="work_package" data-text="###72775">\#\#\#72775</mention> )*
      
        - *\[open\] This is possibly them most logical location for the "Share with all projects" setting*
  
    - Only sprints from one sharing project are received. If there are multiple projects from which a receiving project could take its sprints the order of priority is as follows (lowest to highest priority):
      
        - All projects sharing
      
        - Subproject sharing higher up the ancestor chain
      
        - Subproject sharing lower down the ancestor chain
  
    - As long as there is a work package associated to the sprint, the sprint is displayed in the work package's project. That is true even if the sprint is not shared with the project (any more). The sprints can be used just like any other sprint.
  
    - Status, name and dates of a sprint are also shared (can't be different per project)

**Technical notes**

- [x] Migration considerations:
    - Existing versions used as sprints are migrated (read copied).
      
        - The goal is to have an uninterrupted user experience when switching from the pre-sprint state to the post-sprint state.
      
        - A version is migrated to a sprint if
          
            - the version is configured to be displayed "left" (for "Column in backlog") in a project
          
            - Backlogs is active in that project
          
            - the version has at least one work package associated to it in that project
      
        - Name, start & finish date, status are migrated
          
            - Mapping of status
              
                - Version open -\> Sprint in planning
              
                - Version locked or closed -\> Sprint completed
      
        - The project the sprint is created in and the sharing it has:
          
            - *\[open\] Needs to be defined*
          
            - Set all Project sharing option to "Receive shared sprints" by default.
          
            - Take all the Versions and iterate their sharing settings:
              
                - When Version is "Share with All Projects" -\> Set the Project to "Share Sprint in All Projects"
              
                - When Version is "Share with Subprojects" -\>
                  
                    - If Project is "Share Sprint in All Projects" -\> Do nothing
                  
                    - Else -\> Set the Project to "Share with Subprojects"
              
                - When Version is "Share with Hierarchy" or "Share with Tree" -\>
                  
                    - Move up to the root Project of the hierarchy and set the Sprint Project to the root Project.
                  
                    - If root Project is "Share Sprint in All Projects" -\> Do nothing
                  
                    - Else -\> Set the root Project to "Share with Subprojects"
              
                - When Version is "Share with None" -\>
                  
                    - Do nothing.
      
        - The existing connection from a work package to a version is kept
          
            - The reason for this is that we cannot differentiate programmatically whether a version was only used as a sprint or if it also served the role of a version.
  
    - Work packages associated to a migrated version are associated to the created sprint.
      
        - A journal is written by the system user informing about the shift from version to sprint - no notification is sent
          
            - *\[open\] Phrasing of the message: "Version '{version name} has been converted to a sprint."*
  
    - Permissions need to be migrated:
      
        - View master backlog → View sprints
      
        - View taskboards → View sprints
      
        - Select done statuses - removed
      
        - Update sprints → *(remove, but to be confirmed)*
      
        - Manage versions  → Create sprints (?)
      
        - Assign versions → (split) Manage sprint items

**Permissions and visibility considerations**

  - Backlogs needs to be activated for any of the permissions to work

  - View sprints
    
      - Allows accessing backlogs
    
      - Allows seeing sprints on work packages (once that feature is developed)
    
      - Allows accessing the burndown chart
    
      - This permission is a dependency for all the other permissions below. This is coded in.

  - Create sprints
    
      - Allows adding/updating/deleting sprints including name, dates but excluding status. Allows to configure whether to receive or to not receive shared sprints in the project configuration.

  - Start/complete sprint
    
      - Allows changing the status of the sprint

  - Manage sprint items
    
      - Allows adding and removing from a sprint, and re-ordering of items

  - Share sprint
    
      - Allows to configure sharing (all projects or sub-projects) in the project configuration
    
      - Depends on the user having the "Create sprints" permission.

**Translation considerations**

  - *Key terms and phrases in the key languages*

**Out of scope**

  - Having a sprint board (for now)
