UNCLASSIFIED - NO CUI

Skip to content

BULL-1244 | Update Soft Delete to Hard Delete for course_pending_registrations tuples

Baban Faraj requested to merge BULL-1244 into master

I have updated the issue where a duplicate pending request for adding a user to a course as a pending request fails.

The bug was fixed by applying a hard delete rather than a soft delete.

The fault resided in the section where a user was approved to join a course, and then a soft delete occurred. Once the soft delete occurred, the corresponding tuple in the course_pending_request table still existed and was only just updated to mention when it was deleted(Which is okay). When another user attempts to add the same user to the course as a pending request it fails. It fails because the unique fields mentioned within the sequalize model class are courseID and userID whereas in the SQL table, the primary key is the auto increment ID. Theoretically, this should not fail since we have the primary key as an auto increment variable so there should never really be a duplicate. However, this is out of the scope of this ticket.

Steps to test the bug fix:

  1. Launch Launchboard using the local development docker compose
  2. Add a second user, add the user to teams, add the user to team_members table via SQL commands
  3. Create a course within using Launchboard-FE
  4. Add a pending request for the second user created to the newly created course using Launchboard-FE
  5. Approve the pending request using Launchboard-FE
  6. Add another pending request for the second user again using Launchboard-FE and no error should pop up or run the following SQL command to ensure the table does not contain the user anymore: select * from course_pending_registrations;
Edited by Baban Faraj

Merge request reports