On a clean moodle installation create 1 instance of the old assignment module and 1 instance of the new assignment module. (Must be clean so the database ids will collide)
Use the assignment upgrade tool to upgrade the old assignment
Edit the settings for the upgraded assignment and click save
Verify that the settings are saved and you do not receive an error: "Found more than one record in fetch() !"

Affected Branches:

MOODLE_23_STABLE

Description

There still exists a way for the assignment upgrade tool to cause duplicate values in the gradebook. This is a critical bug.