# Bug SPAR-256 - Adding or removing successor in relations tab is not correctly reflected in Gantt chart

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Relations and scheduling, Modules and project features / Gantt view |
| Target versions | 16.5.0 |
| Observed in versions | 15.5.0 |
| Bug found in version (deprecated) | 15.5.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Mir Bhatia |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

Extracted from <mention class="mention" data-id="61807" data-type="work_package" data-text="##61807">\#\#61807</mention>.

### Steps to reproduce

Scenario "Add predecessor/successor"

1.  Create two work packages with dates "pred" and "succ"

2.  Display "pred" in split panel with relations tab

3.  From the relations tab, select "+ Relation" \> "Successor (after)", and select "succ", then click "Add" button

4.  🔴 In the Gantt chart, the blue line linking "pred" to "succ" is sometimes not shown (it can be briefly visible and then disappears, or it can be visible and stays visible)

5.  Refresh the page to see the blue line relation in the Gantt chart

6.  From relations tab, click the three dot menu next to the relation and select "Delete relation"

7.  🔴 In the Gantt chart, the blue line linking "pred" to "succ" sometimes reappears (it can be briefly removed and then reappears, or it can be removed and stays like this)

### What is the buggy behavior?

  - The Gantt chart is updated too late or too early and the relation state being shown is not the correct one.

### What is the expected behavior?

1.  The Gantt chart should always reflect the actual relations when some actions are done to add or remove some.
    
    1.  There can be some flickering in between but the result should be the right one.

### Screenshots and other files

one video added

### Environment information

**OpenProject version**

Unreleased 15.5 with automatic scheduling changes
