gruntultra / pe

0 stars 0 forks source link

Side Panel showing the list of internships not updated to command #3

Open gruntultra opened 4 years ago

gruntultra commented 4 years ago

The usual behavior is that if a same internship was added with different status, it will update the exisiting internship with that status. The side list panel however, does not update to reflect the changes even if the right panel is updated

image.png

Steps to reproduce:

  1. Archival Mode
  2. Type in the command "add c/Google r/Software Engine d/17 04 2020 s/rejected"
  3. Type in the command "add c/Google r/Software Engine d/17 04 2020 s/applied"
  4. Panel on right updates but panel on left stays the same
nus-pe-bot commented 4 years ago

Team's Response

This is a very specific edge case.

The expected behaviour is a feedback / error message to the user that you cannot add duplicated internship applications. However the exception is not handled properly.

This bug can only be reproduced in a specific case where the user enters the same input for the prefixes as another internship application; which is very unlikely, as users are not likely to apply to the same internship (same company name, same role, same date, same status, etc.) on the same day.

Furthermore, the user has to be on the archival list for this bug to occur.

Therefore, this bug is unlikely to affect normal operations of the software. Even if it appears in the above rare situation, it merely causes a minor inconvenience.

The bug arises due to our implementation of procedural equality checking for archived internship applications.

The workflow is something as follows, which shows how it bypassed our guard clause:

  1. The new duplicated internship application is created as unarchived first
  2. The created internship application is compared against the one in the archival list, where the one in the archival list is archived
  3. Thus, the equality check / guard clause fails (one is unarchived and one is archived) and the created internship application proceeds to be added to the UniqueInternshipApplicationList
  4. Before adding, the created internship application will be turned into an archived one (as we are adding the internship application to the archival list)
  5. This will raise the unhandled exception (in UniqueInternshipApplicationList) as both internship applications are archived and detected as duplicates

Items for the Tester to Verify

:question: Issue severity

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

Reason for disagreement: [replace this with your reason]