Skip to content

Commit

Permalink
Merge pull request #242 from sayglenn/dg-fixes
Browse files Browse the repository at this point in the history
DG Fix and Duplicate Prefix fix
  • Loading branch information
yockcheng authored Nov 12, 2024
2 parents f1a05df + 8a9fed4 commit bed4b8d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
8 changes: 7 additions & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

Use case resumes at step 3.

* 3d. The more than 1 field to sort by is provided.
* 3d. More than 1 field to sort by is provided.

* 3d1. ConTActs shows an error message indicating the sort command takes only 1 field to sort by.

Expand Down Expand Up @@ -550,12 +550,16 @@ Prerequisites: Ensure more than one contact is present. These tests can and shou
1. Marking attendance as present for a contact
1. Test case: `mark 1 tut/1`<br>
Expected: First contact's tutorial box 1 turns green.

2. Test case: `mark 1 tut/1-2`<br>
Expected: First contact's tutorial box 1 remains green and box 2 turns green.

3. Test case: `unmark 2 tut/[1,3]`<br>
Expected: Second contact's tutorial box 1 and 3 turns red.

4. Test case: `reset * tut/1`<br>
Expected: All contact's tutorial box 1 turns grey. First contact's tutorial box 2 remains green and second contact's tutorial box 3 remains red.

5. Test case: `mark 1 tut/2`<br>
Expected: No change will occur. Details shown in the status message.

Expand Down Expand Up @@ -623,7 +627,9 @@ This is makes the `find` command meaningless for large data sets.
Possible improvement is to implement a "match score" to rank the contacts by, and display them in that order instead.

10. We plan to allow sorting by more than 1 fields (e.g: by name AND tutorial), to further improve the usefulness of sort.

---

## **Appendix: Effort**

### Difficulty Level
Expand Down
2 changes: 1 addition & 1 deletion docs/diagrams/BetterModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ UniquePersonList -right-> Person

Person -up-> "*" Tag

Person ---> "12" Tutorial
Person *--> "12" Tutorial
Person *--> "1" Name
Person *--> "1" StudentId
Person *--> "1" Phone
Expand Down
Binary file modified docs/images/BetterModelClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public AddCommand parse(String args) throws ParseException {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));
}

argMultimap.verifyNoDuplicatePrefixesFor(PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL);
argMultimap.verifyNoDuplicatePrefixesFor(PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_STUDENT_ID);
Name name = ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get());
StudentId studentId = ParserUtil.parseStudentId(argMultimap.getValue(PREFIX_STUDENT_ID).get());
Phone phone = ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE).get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
import static seedu.address.logic.parser.CliSyntax.PREFIX_STUDENT_ID;
import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;
import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;
import static seedu.address.testutil.TypicalPersons.AMY;
Expand Down Expand Up @@ -84,7 +85,8 @@ public void parse_repeatedNonTagValue_failure() {
assertParseFailure(parser,
validExpectedPersonString + PHONE_DESC_AMY + EMAIL_DESC_AMY + NAME_DESC_AMY
+ validExpectedPersonString,
Messages.getErrorMessageForDuplicatePrefixes(PREFIX_NAME, PREFIX_EMAIL, PREFIX_PHONE));
Messages.getErrorMessageForDuplicatePrefixes(PREFIX_NAME, PREFIX_EMAIL, PREFIX_PHONE,
PREFIX_STUDENT_ID));

// invalid value followed by valid value

Expand Down

0 comments on commit bed4b8d

Please sign in to comment.