# Bug SPAR-281 - When switching to Automatic mode, "Working days only" is not set correctly

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Relations and scheduling |
| 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.  Create 2 work packages, parent and child
    
    1.  child has "Working days only" checked (the default)
    
    2.  parent is in automatic mode with "Working days only" checked

2.  Edit the parent dates, switch to manual mode and uncheck "Working days only"

3.  Save

4.  Edit the parent dates again, switch to automatic mode

5.  Save

### What is the buggy behavior?

  - The parent still has "Working days only" unchecked

### What is the expected behavior?

1.  As the parent is in automatic mode, its "Working days only" value should be dictated by its children's values.
    
    1.  If all children have "Working days only" checked =\> parent has "Working days only" checked
    
    2.  If at least one child has "Working days only" unchecked =\> parent has "Working days only" unchecked.

2.  Also, when switching from manual to automatic, the checkbox should become checked as soon as "Automatic" is clicked.

Note: this bug occurs also if the child has it unchecked initially, and we check it in the parent when switching it to manual. When then switching to automatic, it keeps its checked state.

### 

### Screenshots and other files

See attached screen recording

### 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**

seen on 16.5, and also in 16.4, 16.3, and 16.2 (did not try older versions)

**Browser**

- [ ] Chrome
- [x] 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
