Skip to content

Fix the issue that edit command allows duplicate emails or phone#342

Closed
Elinengu wants to merge 490 commits into
nus-cs2103-AY2425S1:masterfrom
AY2425S1-CS2103T-F12-1:fix-allow-same-phone-mail
Closed

Fix the issue that edit command allows duplicate emails or phone#342
Elinengu wants to merge 490 commits into
nus-cs2103-AY2425S1:masterfrom
AY2425S1-CS2103T-F12-1:fix-allow-same-phone-mail

Conversation

@Elinengu

@Elinengu Elinengu commented Nov 3, 2024

Copy link
Copy Markdown

Closes #154

The reason why the original if else statement does not work is that, as the the isSamePerson check if there is the same email or same phone number, hence in this statement:

        if (!personToEdit.isSamePerson(editedPerson) && model.hasPerson(editedPerson)) {
            throw new CommandException(MESSAGE_DUPLICATE_PERSON);
        }

The duplicate email/phone number can by pass the hasPerson check if the original phone number or email remains unchanged.

weiseng18 and others added 30 commits October 17, 2024 22:47
Update UG add command (new `r/` parameter)
Find command now support finding contacts based on module-role with
prefix r/, e.g. find r/cs1101s-ta.
If role is not specified, student is assumed.
When multiple inputs are given, e.g. find r/cs1101s-ta r/cs1231s n/Ben,
contacts matching any of the keywords given will be shown.
find n/name r/module-role only finds matching module-role.

Refine the logic such that find n/name r/module-role finds contacts with
matching name AND module-role.
Use the following syntax:
`edit [index] /r+(MODULECODE[-ROLETYPE])+`
…nal-in-add-command

Make module optional in add command
lithops-zty and others added 28 commits November 1, 2024 23:39
…isplayed-email

Bugfix: `Optional[]` no longer displayed in edit messages
…d-gui

Add icons for person info in Person Card
# Conflicts:
#	src/test/java/seedu/address/logic/parser/ParserUtilTest.java
…-role

`edit r/-` now deletes irrespective of role if role is unspecified
@Elinengu Elinengu closed this Nov 3, 2024
potaotototo pushed a commit to potaotototo/tp that referenced this pull request Nov 11, 2024
…isplay-message

Change Person to Student in display message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants