# Bug OP-10549 - Editing work packages with existing duration results in a validation error

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-10549

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Low |
| Module |  |
| Target versions | 12.3.0 |
| Observed in versions | 12.3.0 |
| Sprint | 12.3.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 12.3.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Have a work package with a duration and differing start/end date (currently only via console) 
2.  Edit the Subject of the work package
3.  Saving the work package will result in a validation error on the duration.

### What is the buggy behavior?

  - Upon validating the work package for save, if there is a mismatch between the start-stop dates and the duration, then a validation error will be thrown.

### What is the expected behavior?

1.  There should be no validation error on the duration when editing the subject of a work package.
2.  We need a mechanism that keeps the start/stop dates and the duration in sync.

### Screenshots and other files

See the attachments for a video demo.

### Environment information

This is related to the [PR\#10749](https://github.com/opf/openproject/pull/10749), but it is just surfaced in the PR and not caused by it.

**OpenProject version**

Latest dev branch.
