AidenLYT / pe

0 stars 0 forks source link

Updating a person allows duplicate entries #2

Closed AidenLYT closed 7 months ago

AidenLYT commented 7 months ago

image.png

Description

Given that it is for CS2100, the contact list should not accept 2 contacts of the same name (would be weird if there exists a student who is in both tutorial group T11-2 and A12-3) -> module restriction 1 tutorial per student.

Steps to reproduce

  1. Launch the application
  2. Run command uc 6 n/Irfan Ibrahim

Expected behavior

Duplicated person (name) in index 5

Actual behavior

Index 6 successfully change name to the same as Index 5

Reason for severity

Would inconveniences the TA if they were to see a student belonging to 2 tutorial group when NUS CS2100 only restricts 1 student 1 tutorial group.

Idea

When updating the contact, check whether the updated fields contacts duplicate with the other contacts.