Edit on an Issue may open an older version of the issue.
Summary
Starting approximately late June / early July 2019, there is a random (but common) chance that when I click Edit on an issue, the editor will open with text from an older version of the issue.
Steps to reproduce
- Open an issue.
- Click Edit.
It does not happen every time, but is happening several times a day (in a day w/ heavy Gitlab use).
It happens both if I click Edit just after refreshing the page, or if I click Edit on a tab that has been open for days, receiving background updates from other Gitlab users marking tasks as done.
In particular, I can refresh the browser page first, and verify that for sure I am looking at the latest version of an issue, and then see the older version of the issue text appear in the edit box when I click Edit. E.g., I can see a task marked as complete in the HTML view, then click Edit on that issue, and that task will not have an [x] in the Markdown. Or I can see a task that was recently added in the HTML view, click Edit, and be looking at text of the issue that does not have that task - i.e. from before it was added.
I have not seen it happen with a newly-opened Gitlab tab, but since it does not happen every time I cannot say definitely that it won't, and regardless opening a new tab every time I follow a link is not a reasonable way to use the site.
Witnessed in Chrome on Windows and in Safari on Mac. Witnessed on multiple different issues.
Example Project
This is happening on hosted gitlab.com.
What is the current bug behavior?
If you don't notice what happened and go ahead and make your edit, then you lose whatever new tasks, task completions, notes, etc. had been entered once you save that edit.
We have verified that this is not due to multiple people editing at the same time, by isolating an issue so that everyone else knew not to touch it and trying+succeeding to recreate it.
What is the expected correct behavior?
Click Edit on an issue after refreshing the page to ensure you have the latest, and actually be editing the latest. Don't lose your stuff.
Notes
Since there is not (yet) any versioning of issue text, once this has happened you're just out of luck unless you happened to have the issue open on another computer which also happens to have not picked up the automatic/background update of the issue text.
Possible fixes
This procedure seems to consistently work around the problem: 1. Click Edit, 2. Click Cancel, 3. Click Edit. After step 1, the editor may have opened with an older version of the issue text, but after step 3 it seems to have always reliably opened with the latest issue text.