# Bug OP-10721 - Able to set a follower starting before its predecessor

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 12.2.0 |
| Observed in versions | 12.1.0 |
| Sprint | 12.2.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 12.1.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

*Please write down the steps to reproduce. Try to write down all necessary preconditions (what permissions do you have, are other users involved?). Example:*

1.  Create a predecessor work package, with dates
2.  Create a follower work package, with dates, following the predecessor
3.  Create a child work package, child of the follower
4.  Open the date picker for the child, and unset start date, and set end date to a date before predecessor

### What is the buggy behavior?

  - The follower dates are changed to match the dates of the child, moving it *before* its predecessor, which is wrong

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

  - When picking the dates of the child, it's possible to select dates before the predecessor due date

<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/35030/content"></div><figcaption class="op-uc-figure--description">date picker for child, any dates can be selected</figcaption></figure>

### What is the expected behavior?

  - There should be an error message preventing me from doing this change
  - ~~The forbidden dates in the date picker should be disabled, like when trying to set parent's dates~~ 
      - does not work: <https://community.openproject.org/projects/openproject/work\_packages/43223/activity#activity-8>

<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/35031/content"></div>
<figcaption class="op-uc-figure--description">date picker for follower, with dates before predecessor&amp;amp;amp;amp;#39;s due date being disabled as expected</figcaption></figure>

### Environment information

**OpenProject installation type**

- [ ] Hosted cloud edition
- [ ] Packaged installation
    - What distribution?
- [ ] Docker All-in-one container
- [ ] Docker-compose installation
- [x] Other (please specify) dev 7f8df1d094

**OpenProject version**

happening on dev at 7f8df1d094 (around 12.2.x), ~~but I did not have an earlier version to test it~~. It also occurs on 12.1.6, and 12.1.0.

**Browser**

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

**Language**

English
