Raymond0212 / pe

0 stars 0 forks source link

worker-avail shows worker taking leave #4

Open Raymond0212 opened 3 years ago

Raymond0212 commented 3 years ago

Worker is taking leave but still shown in worker-avail. image.png

nus-se-bot commented 3 years ago

Team's Response

Accepted. This bug is a result of a bug in the implementation of the role-edit command. After editing the role in the role list, as well as all instances of that role in each worker and shift, we did not edit instances of the role in the workers/shifts stored in the list of assignments. Thus, when unassign is called after editing the 'Cashier' role to 'Burger flipper', the Bernice Yu worker object in the worker list (first screenshot) no longer equals the one in the assignment list (second screenshot) (note the difference in the roles set in the two Bernice Yu objects). And therefore, the error shows that the assignment does not exist as we use the worker object in the current worker list as an identifier to match the worker in each assignment in the assignment list.

Screenshot 2020-11-17 at 7.37.10 PM.png

Screenshot 2020-11-17 at 7.35.12 PM.png

Items for the Tester to Verify

:question: Issue severity

Team chose [severity.High] Originally [severity.Medium]

Reason for disagreement: [replace this with your reason]