Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moderation update overwrites previous fields #2828

Open
GMishx opened this issue Dec 17, 2024 · 0 comments
Open

Moderation update overwrites previous fields #2828

GMishx opened this issue Dec 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@GMishx
Copy link
Member

GMishx commented Dec 17, 2024

Description

When a user modifies a project/component updating field "F1", a moderation request is created. When the same user modifies the same project/component but updates field "F2", the moderation request is updated and the updates for field "F1" gets lost.

The logic of ModerationRequestGenerator::setAdditionsAndDeletions() seems to incorrect. Upon a PATCH request, the ModerationDatabaseHandler::createRequest() gets the latest moderation request by the user and tries to update it with the new fields. However, in the update process, the old field gets overwritten.

How to reproduce

  1. With a non-moderator user, modify a project's description.
  2. Check the created moderation request.
  3. With the same user, modify the same project's version.
  4. Check the moderation request, the update of "description" field does not exists anymore and is overwritten with "version" update.

Versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant