decaporg / decaporg/decap-cms

Open authoring: Changes to same file by different author overwrites previous change

Open
#3,814 1 comment 0 reactions 0 assignees View on GitHub
area: ui/editorial-workflow type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**
When a contributor (userB) starts making a change to the same file that another contributor (userA) has already changed and sent for review (but is not yet merged), and a maintainer merges the change from userA before userB sends his change for review, when userB sends his change for review, the changes from userA are overwritten.

**To Reproduce**
1. Edit a page using CMS as userA.
2. Send userA's change to review.
3. Edit the same page using CMS as userB. (Do not send this change to review yet)
4. Merge the change from userA to master as a maintainer using Github.
5. Send userB's change to review.
6. The diff of userB's change now shows the changes from userA as deleted and his own changes as added.

**Expected behavior**
When userB sends their change to review, I think the CMS should rebase against master before creating the PR. Instead I think it is currently force pushing?

**Screenshots**
Diff showing userA's change:
![image](https://user-images.githubusercontent.com/29064556/82886596-a730bf80-9f3e-11ea-995a-d459f8a64c8b.png)

Diff showing userB's change (before restoring the lost changes manually):
![image](https://user-images.githubusercontent.com/29064556/82887018-49e93e00-9f3f-11ea-8939-ad3c8bcdc8cb.png)

**Applicable Versions:**

- Netlify CMS version: netlify-cms 2.10.49
- Git provider: GitHub
- OS: Windows 10
- Browser version: Chrome Version 81.0.4044.138 (Official Build) (64-bit)

**CMS configuration**
https://github.com/Axway/axway-open-docs/blob/master/static/admin/config.js

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.