# Bug SPAR-217 - Invalid error displayed when switching parent to automatic

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 15.4.1 |
| 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

3 reproduction paths:

**child has no dates**

1.  Have two work packages, parent and child
    
    1.  parent is manually scheduled with dates
    
    2.  child is manually scheduled without dates

2.  Open the date picker for the parent

3.  Clear dates

4.  Switch scheduling mode to Automatic

**child has dates**

1.  Have two work packages, parent and child
    
    1.  parent is manually scheduled with dates different from its child
    
    2.  child is manually scheduled with some dates

2.  Open the date picker for the parent

3.  Select same dates as the child

4.  Switch scheduling mode to Automatic

**a success work package in automatic mode**

1.  A successor work package in automatic mode (having some predecessor(s))

2.  Open the date picker

3.  Switch to manual scheduling mode and select dates ***before*** the predecessor(s) dates

4.  Switch back to automatic scheduling

### What is the buggy behavior?

  - The date fields display error "Was attempted to be written but is not writable."

  - For the third case, it displays the error "Can only be set to 2025-03-27 or later so as not to violate the work package's relationships."

### What is the expected behavior?

1.  Display no errors

**Analysis**: For the 2 first cases, this happens because the change by the user matches the change by the system. The change by the system is not recorded as such and is still seen as a change by the user. As the field is readonly, an error is displayed.

For the third case, it takes the dates into account but it should ignore them. Maybe better not to send them at all.

### Screenshots and other files

Attached videos for each of the scenarios

And this picture:

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

<br>

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

### Environment information

**OpenProject version**

15.4.0
