# Bug SPAR-238 - Toggling non-working days resets the start date in some cases

Project: Stream Planning and Reporting
Status: closed
URL: https://community.openproject.org/work_packages/SPAR-238

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 15.5.0 |
| Observed in versions | 15.4.0 |
| Bug found in version (deprecated) | 15.4.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

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

## Planning

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

## Costs

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

## Description

### Steps to reproduce

  - Open a manually scheduled WorkPackage

  - Open the datepicker

  - Ensure "Working days only" is off

  - Change the finish date

  - Toggle the "working days only" on

### What is the buggy behavior?

  - The due date is kept while start date and duration are changed causing a weird jump which no user will ever understand

<br>

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/398002/content">

### What is the expected behavior?

  - Due date should be kept AND either start date or duration should be kept as well

  - [This test](https://github.com/opf/openproject/pull/18425/files#diff-35d35056ea950c36ec9d1a346f6fb0fe98becea4e2d35de0a2fb90527e5335ebR384) should ideally be unset as pending after wards. It checks for [Scenario 14](https://community.openproject.org/projects/openproject/work_packages/62599/activity#scenario-14b-switch-to-manual-change-finish-date-and-non-working-days-back-to-automatic-) of <mention class="mention" data-id="62599" data-type="work_package" data-text="#62599">#62599</mention>

### 

### Environment information

**OpenProject version**

*15.5*

**Browser**

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

**Operating System**

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

**Language**

English
