Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add editing of Birthdays using the edit command #28

Merged
merged 3 commits into from
Mar 18, 2024

Conversation

zhekaiii
Copy link

@zhekaiii zhekaiii commented Mar 16, 2024

Implements #27 and adds more test cases for BirthdayTest

@zhekaiii zhekaiii requested a review from alvinnzz March 16, 2024 02:41
@zhekaiii zhekaiii self-assigned this Mar 16, 2024
Copy link

@alvinnzz alvinnzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some small comments, no big issue

return true;
}
test = test.strip();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps can consider using strip() or trim() in parseBirthday from ParserUtil although this works as well

@@ -64,7 +64,8 @@ public void toStringMethod() {
+ editPersonDescriptor.getName().orElse(null) + ", phone="
+ editPersonDescriptor.getPhone().orElse(null) + ", email="
+ editPersonDescriptor.getEmail().orElse(null) + ", address="
+ editPersonDescriptor.getAddress().orElse(null) + ", tags="
+ editPersonDescriptor.getAddress().orElse(null) + ", birthday="
+ editPersonDescriptor.getBirthday().orElse(null) + ", tags="
+ editPersonDescriptor.getTags().orElse(null) + "}";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we standardize on whether to put birthday or tags in front or it doesnt really matter?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously I encountered some bug, and I thought tags have to be at the back because tags can have multiple values so I put birthday before tags, but turns out it doesn't matter. So let's standardize and have new attributes be at the back.

@zhekaiii zhekaiii requested a review from alvinnzz March 17, 2024 05:03
Copy link

@alvinnzz alvinnzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alvinnzz alvinnzz merged commit e64ba30 into AY2324S2-CS2103T-T16-2:master Mar 18, 2024
3 checks passed
@zhekaiii zhekaiii added this to the v1.2 milestone Mar 18, 2024
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.

2 participants