# Feature SPAR-24 - Disable following work packages from automatically deriving dates when preceding one is moved

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

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Wish List |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**As** an OpenProject user  
**I want to** make sure that changing start/finish dates of a preceding work package won't change the start/finish dates of following work packages *only* if the changes violate the relationship  
**so that** dates of following work packages are not automatically changed when I don't expect them to

### Current behaviour

Today, when **adding** a follows/precedes relationship, assuming A is preceding and B is following:

When B has no dates:

  - If A has a finish date and B has no dates, **B will derive its start date from the finish date of A (n+1 day)**
      - This is true regardless of A having a start date or not
  - If A only has a start date and B has no dates, **B will derive its start date from the start date of A (n+1 day)**

When A has no dates but B has start/finish dates:

  - If A has no dates but B has a start date *or* finish date *or* both, A will not derive any dates (empty start/finish).

When both A and B both have dates:

  - If the start *and* finish date of B are later than the start *and* finish date of A, the dates of both work packages will be conserved.
  - If the start *or* finish date of B is earlier than the start *or* finish date of A, **B will derive its start date based on the soonest start date of A (finish date of A + 1, or start date of A + 1 if finish date is not set)**.

Until here, things make sense. However, the problematic behaviour is when, for a follows relationship between A and B:

  - If B only has a finish date (anytime in the future), when simply *moving A*, **B will derive its start date based on the finish date of A, or start date if finish date does not exist**.
  - If B has no dates at all, simple *moving A*, **B will derive its start date based on the finish date of A, or start date if finish date does not exist**.

Here's a screencap of this behaviour:

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

### **Acceptance criteria**

To make this behaviour more consistent, and in line with <mention class="mention" data-id="44053" data-type="work_package" data-text="#44053">\#44053</mention> (where moving a following/preceding will conserve dates and not moving related work packages around unless that relationship is violated):

Given that A precedes B:

  - When A has dates (start, finish or both) and B either does not have dates:
      - Moving or changing the duration of A has no effect on the dates of B
  - When A has dates (start, finish or both) and B has a finish date:
      - Moving or changing the duration of A has no effect on the dates of B, unless
          - A is moved to *after* B's finish date, in which case, B will derive its start date based on the soonest start date of A  (thereby preventing a violation of the follows relationship)
