feat: allow 2 users to complete a questionary concurrently - #1723
feat: allow 2 users to complete a questionary concurrently#1723TCMeldrum wants to merge 4 commits into
Conversation
|
I think there is an edge case that was missed. Where if person 1 edits and saves the proposal while person 2 is in the review phase. Then person 2 presses the back button, they load the inital answers into the form (before person 1 edited it). Then they do their update and it effectively deletes person 1s edits from existence. Screencast.From.2026-08-24.09-17-13.mp4I would not say that this bug necessarily is a reason to reject this PR though. |
|
I might vote to use radio-buttons instead of checkboxes when selecting which answer to use. Because checkboxes imply you could select both. (which makes sense for text to append) radio buttons you usually can only select 1 |
| </Box> | ||
| <Box sx={{ width: '50%' }}> | ||
| <Typography variant="body2" color="textSecondary"> | ||
| Your current Answer |
There was a problem hiding this comment.
"Your current answer:"
"Your current answer"
maybe
| > | ||
| <Box sx={{ width: '50%' }}> | ||
| <Typography variant="body2" color="textSecondary"> | ||
| Currently saved Answer |
There was a problem hiding this comment.
Currently saved answer
| > | ||
| <Typography variant="h6"> | ||
| { | ||
| 'A User has updated some answers while you have been completing this form. Please review the answers below and select which ones you would like to keep.' |
There was a problem hiding this comment.
"A user has updated"
|
I think the abstract can still be deleted when two users edit it simultaniously. Maybe it it is worth getting that to be included in the same validation if possible? I imagine that might even be the most edited/conflicted field ? |
|
@zacharyjhankin Thanks very much for the review! I think its not just if one user is in the review phase, its part of a larger bug as when you navigate to a topic it doesn’t re-fetch the answers as I thought it did so a user 2 users editing different topic might cause conflicts. Thanks for finding it! For the instrument picker question I could not replicate it my set up will look into further. For the proposal abstract I was going to try and fix it in another PR as it is on a different mutation to the rest of the answers but I'll try and deal with here as well. |

Description
This PR introduces functionality to allow 2 users to complete a questionary concurrently.
Motivation and Context
The change is required to prevent conflicts and data loss when two users edit a proposal at the same time. The system will prompt the second user to merge their answers, thus ensuring data integrity and a smoother user experience.
Changes
How Has This Been Tested?
Fixes Jira Issue
https://jira.ess.eu//browse/
Depends On
Tests included/Docs Updated?