SchoolyB / Hallpass-Hero

A lightweight CLI tool for instructors to track student performance and attendance | WIP
MIT License
4 stars 1 forks source link

Bug: Unable to preform any action on an existing roster after sorting it first #33

Open SchoolyB opened 9 months ago

SchoolyB commented 9 months ago

Found in #32

Steps taken to recreate this bug. These steps assume you already have a roster created. If you do not....create one and add a student

  1. Make and run executable
  2. From main menu got to manage roster menu(2)
  3. From manage roster menu go to view rosters(1)
  4. From view rosters enter the name of a roster with at least 1 row of data in it and hit enter key
  5. Read warning message. Enter 'y' and hit enter key
  6. When presented with the option choose to sort the roster(1) and hit enter key
  7. Enter the name of any column. I tend to use FirstName. then hit enter key
  8. Choose which order you'd like to sort the roster. It does not matter which you choose. then hit enter key
  9. Press any key and you will return back to manage roster menu
  10. From manage roster menu choose to remove student from roster(5)
  11. Enter the name of a roster with at least one row of data then hit the enter key
  12. Enter the full StudentID then hit the enter key
  13. Enter 'y' to confirm that you want to delete the student and hit the enter key

After completing all those steps in order the program will run its checks and say it successfully deleted the student form the roster,But if you look at the roster either using the program or a third party SQL viewer you will see the chosen student is still in the roster. This only happens if you try sorting a roster first. If you restart the program and go straight to deleting data from a roster everything is fine.

Errors are logged from the backend as well. See screenshot below

image

SchoolyB commented 9 months ago

Did some digging. Come to find out everything breaks after calling either sort_roster_col_ascending() or sort_roster_col_descending()

The database locks.