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

Branch v1.2 #93

Merged
merged 39 commits into from Oct 15, 2019
Merged

Branch v1.2 #93

merged 39 commits into from Oct 15, 2019

Conversation

chowyiyin
Copy link

Add merging feature for duplicate persons.
Fixed coverage bug.
Display policies in the same way as tags for PersonListCard.

execute() now throws DuplicatePersonWithoutMergePromptException if compulsory fields are equal and only throws DuplicatePersonWithMergePromptException if any compulsory field is different.
…to AGE_ZERO and AGE_INFINITY respectively if it was not specified in user input
Copy link

@larrylawl larrylawl left a comment

Choose a reason for hiding this comment

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

This is some amazing work man; i'm really impressed by your feature (and how much you got done.) Good job yi yin!

A few pointers from me:

  1. I'd recommend to try and break your PR down into smaller chunks (ie coverage bug can be in another PR) for the advantages of adopting CI. Some em off the top of my head include 1) lesser time resolving merge conflicts 2) easier to identify which PR broke master branch 3) better PR reviews (easier for the reviewer to review small PRs than large ones) .

  2. I'd recommend to update DeveloperGuide.adoc about how to merge commands too. It might save time in the long run as you can ask the rest of the team (like me) to refer to the dev guide if they aren't sure how to use the merge command.

good stuff once agn!

@@ -29,22 +28,19 @@
+ PREFIX_EMAIL + "EMAIL "
+ PREFIX_ADDRESS + "ADDRESS "
+ PREFIX_DATE_OF_BIRTH + "DATE OF BIRTH "

Choose a reason for hiding this comment

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

Missing line break after PREFIX_DATE_OF_BIRTH

@@ -14,6 +14,7 @@
+ "NRICs should only contain alphanumeric characters. It should start with S, T, F or G"
+ " followed by 6 numerical numbers and a checksum letter. It should not be blank.\n";

Choose a reason for hiding this comment

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

NRIC regex is wrong. Should be 7 digits instead of 6. Also can consider using this instead as it's stricter (must start with [STFG], end with [A-Z])
^[STFG]\d{7}[A-Z]$
https://stackoverflow.com/questions/29743154/regular-expression-for-nric-fin-in-singapore

case HelpCommand.COMMAND_WORD:
return new HelpCommand();

case MergeCommand.COMMAND_WORD:

Choose a reason for hiding this comment

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

Bug: Does not parse any other command if I type merge.
Steps to reproduce bug:

  1. Type merge
  2. Type any other command (ie listpolicy)
    -> Commandbox will show unknown command

* @throws CommandException Should not be thrown.
* @throws ParseException Should not be thrown.
*/
private void handleInitialisingMergeCommand(String command) throws CommandException, ParseException {

Choose a reason for hiding this comment

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

Bug: When I click enter, it does not merge my command; enter should default to yes.
Solution: Flip the logic around.
if (command.equals("no")) {...} else {...}

}
return rejectCommand;
default:
throw new ParseException(MESSAGE_UNKNOWN_COMMAND);

Choose a reason for hiding this comment

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

Bug: If I type another command in while merging, it says unknown command and i'm not able to proceed further. Should be the same bug I mentioned below

Copy link
Author

Choose a reason for hiding this comment

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

Oh this one was intentional though. I don't think the user should be keying other commands in between the merge.

@larrylawl larrylawl merged commit 8ab7105 into AY1920S1-CS2103-F09-4:master Oct 15, 2019
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.

None yet

2 participants