You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
With a non-moderator user, modify a project's description.
Check the created moderation request.
With the same user, modify the same project's version.
Check the moderation request, the update of "description" field does not exists anymore and is overwritten with "version" update.
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, theModerationDatabaseHandler::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
Versions
The text was updated successfully, but these errors were encountered: