# Bug SPAR-282 - On work package creation, "Working days only" is not saved

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Work packages |
| Target versions | 16.6.0 |
| Observed in versions | 16.5.0 |
| Bug found in version (deprecated) | 16.5.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

1.  Start creating a new work package

2.  From the work package creation page (either full view or split view), edit dates and uncheck the "Working days only" checkbox

3.  Set a subject and click Save button

### What is the buggy behavior?

  - The "Working days only" is still checked.
    
      - Open the date picker for the created work package, you'll see that the "Working days only" checkbox is checked again (being checked is the default).

  - If dates were selected, and these dates were non-working days, then the work package creation would fail with message "Duration is larger than the interval between the start and the finish date."
    
      - that's because the "ignore non-working days" behavior is ignored, so dates are shifted to the next working days, and this alters the duration being initially set

### What is the expected behavior?

1.  "Working days only" should remain unchecked after creation if it was unchecked in the creation page.

### Screenshots and other files

Selecting these dates with "Working days only" unchecked:

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

Will lead to this error when clicking "Save" button:

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

### Environment information

**OpenProject installation type**

  - Hosted cloud edition

  - Packaged installation
    
      - What distribution?

  - Docker All-in-one container

  - Docker-compose installation

  - Other (please specify)

**OpenProject version**

16.5.1

**Browser**

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

**Operating System**

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

**Language**

English
