rdmorganiser / rdmo

A tool to support the planning, implementation, and organization of research data management.
https://rdmorganiser.github.io
Apache License 2.0
100 stars 47 forks source link

Answer overwritten when multiple users edit the same question #1134

Open AliceWi opened 3 weeks ago

AliceWi commented 3 weeks ago

Description / Beschreibung

If two users answer a question simultaneously and then click "Proceed," only the response of the user who clicked "Proceed" first will be saved.

Expected behaviour / Erwartetes Verhalten

Based on the issue #626 and the release notes of 2.1.0, I expect the following:

Conflicts will be prevented when users attempt to edit the same values simultaneously.

Steps to reproduce / Schritte zum Reproduzieren

  1. User 1 edits Question A in RDMO.
  2. User 2 edits Question A in RDMO.
  3. User 1 clicks "Proceed".
  4. User 2 clicks "Proceed" after User 1.
  5. Result: Question A contains the answer from User 1.

Context / Kontext

RDMO Version 2.1.3

References / Verweise

jochenklar commented 2 weeks ago

Hi @AliceWi! In your example, does User2 get a message that the value is not saved? If yes, that is (at least my) expected bahavior. If not, this might be a bug which is already fixed, but only in the upcoming release.

AliceWi commented 1 week ago

Hi @jochenklar! I double-checked and noticed that the two "Proceed" Buttons (under the questions and on the right side under the progress bar) have different behaviours: The Proceed Button under the questions works as expected. However, the Proceed Button under the progress bar continues to the next page regardless of the warning. As a result, the user's changes are lost and the warning only appears for a split second, with that likely going unnoticed.

jochenklar commented 1 week ago

This is a bit odd, the proceed button on the right works a bit different as the blue one on the bottom, but both should save the input. Is the question kind of special?

jochenklar commented 1 week ago

Never mind, I found it. The error message is shown, but then the page is changed anyway. The same is probably the case if you use the navigation. I will look for a fix.