Scenario
Why this is happening ?
When B is submitted, the historical behavior of Tuleap is to consider that the whole artifact is the reference and override whatever values where already set. Usually, if a value is going to be overridden, there is a notification about the conflict with the values that are going to be modified.
However, the link from A to B is an update of artifact A (a new changeset on A but no changes on B). Hence Tuleap doesn't warn about the conflict and the value is overridden silently.
Under the hood, the link update is managed by the REST route that update the artifact links with a PUT
semantic. This means that the artifact links are updated with the data that are present on the artifact view. As the reverse link was not present at page load, it's not sent at update so it is removed.
Identified solutions
Two solutions were investigated
-
Align the behavior of "reverse artifact link update" with artifact update: add detection of reverse links updates and warn user via the concurrent update mechanism.
-
Pro: it's consistent with the rest of artifact update
-
Cons:
-
it's complicated to deal with concurrent edition in its current form.
-
the problem was not existing before the new artifact link view and the previous behavior (no removal of artifact links) is known and expected.
-
Do a special treatment for the reverse links: persist only changes that were explicitly done by the end user. If a link (reverse or forward) is added or removed, its addition or removal is saved in the appropriate artifact, otherwise, nothing change.
-
Pro: it brings the previous, known, behavior.
-
Cons:
-
it's inconsistent with the rest of artifact update (other fields are overridden)
-
Inconsistency in behaviors is one of the key UX issue, we should avoid to introduce new ones.
Proposed change
Solution 2 is selected despite inconsistency because it's currently blocking a significant number of existing users and we have to rollback deployment of new artifact link view in order to prevent issues.
The ideally solution would be solution 1 + ability to handle conflict resolution during concurrent update but it's too costly and, nevertheless, we need to find a temporary solution first.
Examples after fix
Scenario 1 (the original one)
Scenario 2
Scenario 3
-
Given
-
On TAB1, a forward link A -> B is added and "Submit and stay"
-
On TAB2, add a comment and "Submit and stay"
Scenario 4
-
Given
-
On TAB1, the A -> B link is deleted and "Submit and stay"
-
On TAB2, add a comment and "Submit and stay"