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

Fix a bug in the find command for policy expiry and issue dates #121

Conversation

brendanneojw
Copy link
Collaborator

Closes #76

Now when user uses the command with either find pi/01-01 or find pe/01-01 , it will not display the persons with the default policy date of 01-01-1000.

@brendanneojw brendanneojw added this to the v1.3b milestone Oct 30, 2023
@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Files Coverage Δ
.../person/PolicyExpiryContainsKeywordsPredicate.java 54.54% <0.00%> (ø)
...l/person/PolicyIssueContainsKeywordsPredicate.java 54.54% <0.00%> (ø)

📢 Thoughts on this report? Let us know!.

Copy link
Collaborator

@KumChaiYin KumChaiYin left a comment

Choose a reason for hiding this comment

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

LGTM
The changes is intuitive to understand.
Solve the bugs mentioned.

@@ -13,8 +14,8 @@ public PolicyExpiryContainsKeywordsPredicate(String keyword) {

@Override
public boolean test(Person person) {
return keywords.stream()
.anyMatch(keyword -> StringUtil.containsWordIgnoreCase(
return !person.getPolicy().getPolicyExpiryDate().toString().equals(PolicyDate.DEFAULT_VALUE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Great in using the PolicyDate.DEFAULT_VALUE (instead of hardcoded date)

@KumChaiYin KumChaiYin merged commit 9e18c63 into AY2324S1-CS2103T-W16-3:master Oct 31, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in Find command shows persons with default policy dates
2 participants