MayamaTakeshi / redmine_rt

Redmine plugin for Real-Time notification of events
GNU General Public License v3.0
24 stars 4 forks source link

Risk of overwriting issue information during concurrent editing #53

Closed sk-ys closed 9 months ago

sk-ys commented 9 months ago

Under the current specification, if someone else updates an issue while you are editing it, the issue information in the edit area may be forcibly overwritten. I think it might be necessary to take measures such as issuing a warning and displaying the updated areas before overwriting if you were in the middle of editing. What do you think?

MayamaTakeshi commented 9 months ago

That was a bug. I have added a commit to force detection of the conflict (fields in the Edit box should not be updated). However at the moment, the conflict warning doesn't show the conflicting fields.

MayamaTakeshi commented 9 months ago

I have added another commit that I believe solves this issue.

sk-ys commented 9 months ago

Thank you for your response. I'm sorry. I'll chelk it this weekend.

sk-ys commented 9 months ago

I have checked your update. I understand that halting updates to the editing form will allow it to function similarly to the original Redmine. However, the conflict confirmation screen will no longer appear when others update issues in the following order:

  1. Update items that are subject to conflict confirmation (journals with the 'has-detailes' class).
  2. Update journal notes only (journals without the 'has-detailes' class).

Once a conflict occurs during the issue page is open, I think it is necessary to ensure that lock_version is not automatically updated thereafter. Other than that, everything seems fine.

Furthermore, I am considering that there would be no problem with updating the editing form as before your commit if the user has not edited the entire form or a specific item.

sk-ys commented 9 months ago

I have tried to address the issue of the conflict confirmation screen not showing up if there are no details on the last update. https://github.com/sk-ys/redmine_rt/commit/9c4ce952dec696d9224591aba0f990e872d91539

sk-ys commented 9 months ago

I have added support for updates per attribute in issue form. Please confirm. https://github.com/sk-ys/redmine_rt/commit/48914ccd9c6bd6743ed149f03834d4bde8a1b826

MayamaTakeshi commented 9 months ago

Thanks. PR created and merged as #55. (also, created #56)