# Bug AGILE-311 - Starting a sprint fails with HTTP 422 and generic error banner

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Backlogs |
| Target versions | 18.0.0 |
| Observed in versions | 17.5.0 |
| Sprint | Sprint 14 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.5.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

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

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Effort (shirt size) |  |
| Work |  |
| Labor costs |  |

## Description

### Note

I upgraded from 17.4.0 specifically to check whether the issue was already fixed; it persists. Searched for similar bug reports before filing.

### Steps to reproduce

1.  Log in as a Member / Project admin role in the target project.

2.  Create a new project with the Backlogs module enabled.

3.  Create a sprint using the **+ Sprint** button, setting valid start and finish dates (e.g. a 2-week period). The sprint is in "planning" status.

4.  Add at least one work package (a Task) to the sprint, so the sprint is not empty.

5.  Click **Start** on the sprint header.

### What is the buggy behavior?

  - The sprint does not start. A generic error banner is shown with the message "Could not start the sprint" ("Não foi possível iniciar a sprint." in PT-BR).

  - The request `POST /projects/<identifier>/backlogs/sprints/<id>/start` returns **HTTP 422**. 

  - The 422 response body contains only a turbo-stream that injects the generic error banner. It does **not** include any validation message identifying which attribute or rule failed.

  - In the application log (debug level), the request acquires an advisory lock on the sprint, opens a transaction (BEGIN), runs several SELECT queries then issues a **ROLLBACK** and returns 422. No exception or validation message is logged — only the ROLLBACK and the final `status=422` line.

  - The sprint remains in "planning" status. The project's types have a valid open default status ("Novo"/New) and defined closed statuses, so no misconfiguration is apparent from the UI.

### What is the expected behavior?

1.  The sprint should transition to active/started.

2.  The user should be forwarded to the sprint board, as described in the 17.4 release notes for starting/finishing sprints from the sprint header.

### 

### **Logs**

**Local installation (Docker):** With `OPENPROJECT_LOG__LEVEL=debug`, the application log (`docker compose logs web`) shows the advisory lock → transaction BEGIN → workflow/status/custom-field SELECT queries → ROLLBACK → HTTP 422, with no validation message printed. Full debug log attached in the Files section. The complete log is in the attachment `log-opp.txt`

**Browser log:**  
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921938/content">

### 

<br>

### Environment information

**OpenProject installation type:** Docker-compose installation  
**OpenProject version:** OpenProject 17.5.0  
**Browser:** Zen Browser (same behavior with Chrome)  
**Operating System:** Linux (Ubuntu)   
**Language:** Português do Brasil

**OpenProject version**

OpenProject 17.5.0

**Browser**

- [ ] Chrome
- [x] Firefox
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)

**Operating System**

- [ ] Windows
- [ ] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [x] Linux (Ubuntu)
- [ ] Chrome OS
- [ ] Other (please specify)

**Language**

Português do Brasil
