Skip to content

Commit

Permalink
Merge pull request #137 from AY2122S1-CS2103-W14-2/docs-final-check-v1.3
Browse files Browse the repository at this point in the history
Fix UG and DG to be cohesive
  • Loading branch information
lrnshk authored Oct 26, 2021
2 parents 828a153 + d6a3399 commit db5b92a
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 83 deletions.
121 changes: 61 additions & 60 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,28 +286,28 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

**MSS:**

1. User requests for help
2. Track2Gather shows a message with the user guide
3. User accesses the user guide
4. User closes the message
1. User requests for help.
2. Track2Gather shows a message with a link to the user guide.
3. User accesses the user guide.
4. User closes the message.

Use case ends.

**Extensions**

* 2a. User closes the message
* 2a. User closes the message.

Use case ends.


**Use case: UC02 - Edit details of an existing contact**
**Use case: UC02 - Edit details of an existing contact**

**MSS:**

1. User requests to list persons
2. Track2Gather shows a list of persons
3. User requests to edit the details of a specific person in the list
4. Track2Gather edits the person
1. User requests to list persons.
2. Track2Gather shows a list of persons.
3. User requests to edit the details of a specific person in the list.
4. Track2Gather edits the person.

Use case ends.

Expand Down Expand Up @@ -355,10 +355,10 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

**MSS:**

1. User chooses to add a new contact
2. Track2Gather requests for details of contact
1. User chooses to add a new contact.
2. Track2Gather requests for details of contact.
3. User enters the requested details.
4. Track2Gather creates and shows the new contact with given details
4. Track2Gather creates and shows the new contact with given details.

Use case ends.

Expand Down Expand Up @@ -525,13 +525,13 @@ testers are expected to do more *exploratory* testing.
1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.

2. Test case: `delete 1`<br>
Expected: First person is deleted from the list. Details of the deleted person shown in the status message. Timestamp in the status bar is updated.
Expected: First person is deleted from the list. Details of the deleted person shown in the status message.

3. Test case: `delete 1 2`<br>
Expected: First and second persons are deleted from the list. Details of the deleted persons shown in the status message. Timestamp in the status bar is updated.
Expected: First and second persons are deleted from the list. Details of the deleted persons shown in the status message.

4. Test case: `delete 3 1 2`<br>
Expected: First, second and third persons are deleted from the list. Details of the deleted persons shown in the status message. Timestamp in the status bar is updated.
Expected: First, second and third persons are deleted from the list. Details of the deleted persons shown in the status message.

5. Test case: `delete 0`<br>
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
Expand All @@ -543,13 +543,13 @@ testers are expected to do more *exploratory* testing.
1. Prerequisites: Find specific person(s) using the `find` command.

2. Test case: `delete 1`<br>
Expected: First person displayed in the search results is deleted from the application. Details of the deleted person shown in the status message. Timestamp in the status bar is updated.
Expected: First person displayed in the search results is deleted from the application. Details of the deleted person shown in the status message.

3. Test case: `delete 1 2`<br>
Expected: First and second persons displayed in the search results are deleted from the application. Details of the deleted persons shown in the status message. Timestamp in the status bar is updated.
Expected: First and second persons displayed in the search results are deleted from the application. Details of the deleted persons shown in the status message.

4. Test case: `delete 3 1 2`<br>
Expected: First, second and third persons displayed in the search results are deleted from the application. Details of the deleted persons shown in the status message. Timestamp in the status bar is updated.
Expected: First, second and third persons displayed in the search results are deleted from the application. Details of the deleted persons shown in the status message.

5. Test case: `delete 0`<br>
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
Expand Down Expand Up @@ -579,19 +579,20 @@ testers are expected to do more *exploratory* testing.
5. Test case: `edit 1 INVALID_PREFIX/EXAMPLE`<br>
Expected: No persons' contact details will be edited. Error details shown in the status message. Status bar
remains the same.

6. Test case: `edit 1 VALID_PREFIX/INVALID_INPUT`<br>
Expected: No persons' contact details will be edited. Error details shown in the status message. Status bar
remains the same.

2. _{ more test cases …​ }_
7. _{ more test cases …​ }_

### Clearing person(s) with completed SHN periods

1. Clearing person(s) while all persons are being shown
1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.

2. Test case: `clear`<br>
Expected: All persons with completed SHN periods are deleted from the list. Success message is shown. Timestamp in the status bar is updated.
Expected: All persons with completed SHN periods are deleted from the list. Success message is shown.

3. Test case: `clear x` (where x is any character)<br>
Expected: Similar to previous. All trailing characters or whitespaces are ignored.
Expand All @@ -618,78 +619,78 @@ testers are expected to do more *exploratory* testing.

1. Sorting a person while all persons are being shown

1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.

2. Test case: `sort n/`<br>
Expected: The list of persons is sorted by name (in ascending order by default).
2. Test case: `sort n/`<br>
Expected: The list of persons is sorted by name (in ascending order by default).

3. Test case: `sort sh/start:dsc`<br>
Expected: The list of persons is sorted by start date of SHN Period in descending order.
3. Test case: `sort sh/start:dsc`<br>
Expected: The list of persons is sorted by start date of SHN Period in descending order.

4. Test case: `sort sh/end: cn/asc`<br>
Expected: The list of persons is sorted by end date of SHN period (in ascending order by default), then by case number in ascending order.
4. Test case: `sort sh/end: cn/asc`<br>
Expected: The list of persons is sorted by end date of SHN period (in ascending order by default), then by case number in ascending order.

5. Test case: `sort`<br>
Expected: The list is unchanged. Error details shown in the status message. Status bar remains the same.
5. Test case: `sort`<br>
Expected: The list is unchanged. Error details shown in the status message. Status bar remains the same.

5. Other incorrect sort commands to try: `sort shn/start`, `sort p/` (since `p/` is an unsupported field prefix), `...` <br>
Expected: Similar to previous.
6. Other incorrect sort commands to try: `sort shn/start`, `sort p/` (since `p/` is an unsupported field prefix), `...` <br>
Expected: Similar to previous.

2. _{ more test cases …​ }_

### Enforcing SHN

1. Starting a new SHN enforcement session

1. Test case: `session`<br>
Expected: All persons in the list are updated to be non-called.
1. Test case: `session`<br>
Expected: All persons in the list are updated to be non-called.

2. Test case: `session x` (where x is any character)<br>
Expected: Similar to previous. All trailing characters or whitespaces are ignored.
2. Test case: `session x` (where x is any character)<br>
Expected: Similar to previous. All trailing characters or whitespaces are ignored.

2. Updating a person's call status to successful in the current SHN enforcement session

1. Test case: `scall 1`<br>
Expected: First person displayed in the search results is updated as successfully called. The case number of the updated person is shown in the status message. Timestamp in the status bar is updated.
1. Test case: `scall 1`<br>
Expected: First person displayed in the search results is updated as successfully called. The case number of the updated person is shown in the status message.

2. Test case: `scall 3`<br>
Expected: Third person displayed in the search results is updated as successfully called. The case number of the updated person is shown in the status message. Timestamp in the status bar is updated.
2. Test case: `scall 3`<br>
Expected: Third person displayed in the search results is updated as successfully called. The case number of the updated person is shown in the status message.

3. Test case: `scall 0`<br>
Expected: No person is updated. Error details shown in the status message. Status bar remains the same.
3. Test case: `scall 0`<br>
Expected: No person is updated. Error details shown in the status message. Status bar remains the same.

4. Other incorrect scall commands to try: `scall`, `scall x` (where x is larger than the list size), `...` <br>
Expected: Similar to previous.
4. Other incorrect scall commands to try: `scall`, `scall x` (where x is larger than the list size), `...` <br>
Expected: Similar to previous.

3. Updating that a failed call was made to a person in the current SHN enforcement session

1. Test case: `fcall 1`<br>
Expected: First person displayed in the search results is updated as unsuccessfully called. The case number of the updated person is shown in the status message. Timestamp in the status bar is updated.
1. Test case: `fcall 1`<br>
Expected: First person displayed in the search results is updated as unsuccessfully called. The case number of the updated person is shown in the status message.

2. Test case: `fcall 3`<br>
Expected: Third person displayed in the search results is updated as unsuccessfully called. The case number of the updated person is shown in the status message. Timestamp in the status bar is updated.
2. Test case: `fcall 3`<br>
Expected: Third person displayed in the search results is updated as unsuccessfully called. The case number of the updated person is shown in the status message.

3. Test case: `fcall 0`<br>
Expected: No person is updated. Error details shown in the status message. Status bar remains the same.
3. Test case: `fcall 0`<br>
Expected: No person is updated. Error details shown in the status message. Status bar remains the same.

4. Other incorrect scall commands to try: `fcall`, `fcall x` (where x is larger than the list size), `...` <br>
Expected: Similar to previous.
4. Other incorrect fcall commands to try: `fcall`, `fcall x` (where x is larger than the list size), `...` <br>
Expected: Similar to previous.

4. Showing a list of all persons who have not been called in the current SHN enforcement session

1. Test case: `schedule`<br>
Expected: The list is updated to display only persons who have not been called in the current SHN enforcement session.
1. Test case: `schedule`<br>
Expected: The list is updated to display only persons who have not been called in the current SHN enforcement session.

2. Test case: `schedule x` (where x is any character)<br>
Expected: Similar to previous. All trailing characters or whitespaces are ignored.
2. Test case: `schedule x` (where x is any character)<br>
Expected: Similar to previous. All trailing characters or whitespaces are ignored.

### Saving data

1. Dealing with missing/corrupted data files
2. Test case: Empty JSON file.
Expected: Sample Track2Gather person list will be generated with sample persons' information.
3. Test case: Corrupted JSON file.
Expected: Sample Track2Gather person list will be generated with sample persons' information.
1. Test case: Empty JSON file.
Expected: Sample Track2Gather person list will be generated with sample persons' information.
2. Test case: Corrupted JSON file.
Expected: Sample Track2Gather person list will be generated with sample persons' information.

2. _{ more test cases …​ }_

Expand Down
46 changes: 23 additions & 23 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Track2Gather is a **desktop app for contact tracing personnel at the [Ministry o

* **`list`** : Shows a list of all persons.

* **`sort`** : Sorts all persons in the contacts list.
* **`sort`** : Sorts all persons in the persons list.

* **`clear`** : Deletes all persons with SHN periods that are completed at time of command call.

Expand Down Expand Up @@ -86,7 +86,7 @@ Refer to the [Features](#features) below for details of each command.
Adds a person to the persons list for tracking.

Format: `add n/NAME p/PHONE_NUMBER e/EMAIL cn/CASE_NUMBER ha/HOME_ADDRESS [wa/WORK_ADDRESS] [qa/QUARANTINE_ADDRESS] [sh/SHN_PERIOD] [kn/NEXT_OF_KIN_NAME] [kp/NEXT_OF_KIN_PHONE] [ka/NEXT_OF_KIN_ADDRESS]`
* There cannot be multiple persons with the same name (case-sensitive)
* There cannot be multiple persons with the same case number

Examples:
* `add n/Alex p/98765432 e/[email protected] cn/600204 ha/123 Orchard Road #01-100 800123`
Expand All @@ -100,7 +100,7 @@ Format: `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [cn/CASE_NUMBER] [ha/HOM
* Edits the person at the specified `INDEX`
* The index **must be a positive integer** (e.g. 1, 2, 3, ..)
* The index **must not exceed the total number of persons** in the persons list
* There cannot be multiple persons with the same name (case-sensitive)
* There cannot be multiple persons with the same case number
* At least one field to edit must be provided

Examples:
Expand All @@ -111,22 +111,22 @@ Examples:
Finds person(s) based on the field specified by the user and displays them as a list with index numbers.

Format: `find FIELD_PREFIX KEYWORD [MORE_KEYWORDS]`
* Field must be one of `n/`, `p/`, `cn/`, `sh/start:` or `sh/end:`
* Field must be one of the following: `n/`, `p/`, `cn/`, `sh/start:` or `sh/end:`
* For find by name (`n/`),
* search is case-insensitive. e.g `hans` will match `Hans`
* full words will be matched e.g. Han will not match Hans
* For find by phone number (`p/`), phone numbers that starts with one or more keyword(s) will be matched e.g. `123` and `1234` will match `12345678`
* the order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`
* For find by phone number (`p/`), phone numbers that start with the specified number will be matched e.g. `123` and `1234` will match `12345678`
* For find by case number (`cn/`),
* search will only match if case number is equal to one or more keyword(s), e.g. `123` will match `123` but will not match `1234`
* all keywords must be entered in valid case number formats
* search will only match if case number is equal, e.g. `123` will match `123` but will not match `1234`
* case number must be entered in the valid format
* For find by SHN start date (`sh/start:`),
* search will only match if SHN start date is equal to one or more keyword(s), e.g. `2021-01-01` will match `2021-01-01`
* all keywords must be entered in valid date formats
* search will only match if SHN start date is equal, e.g. `2021-01-01` will match `2021-01-01`
* SHN start date must be entered in valid ISO-8601 date format
* For find by SHN end date (`sh/end:`),
* search will only match if SHN end date is equal to one or more keyword(s), e.g. `2021-01-02` will match `2021-01-02`
* all keywords must be entered in valid date formats
* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans` and `2021-01-01 2021-01-02 2021-01-03` will match `2021-01-01`
* Only one of the following can be searched at a time: name, phone, case number, SHN start date and SHN end date
* search will only match if SHN end date is equal, e.g. `2021-01-02` will match `2021-01-02`
* SHN end date must be entered in valid ISO-8601 date format
* Only one of the following can be searched at a time: name, phone number, case number, SHN start date and SHN end date
* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`

Examples:
Expand Down Expand Up @@ -157,14 +157,14 @@ Deletes the person(s) identified by the specified index number(s) used in the di

Format: `delete INDEX [MORE_INDICES]`

* Deletes the contact(s) at the specified `INDEX`(s).
* Deletes the person(s) at the specified `INDEX`(s).
* The index(s) **must be a positive integer** (e.g. 1, 2, 3, ..)
* The index(s) **must not exceed the total number of contacts** in the address book
* The index(s) **must not exceed the total number of persons** in the address book
* The index(s) **can be given in any order** (e.g. `delete 1 4 5`, `delete 5 1 4`)

Examples:
* `sort n/` followed by `delete 2` deletes the 2nd person in the contacts list when sorted by name.
* `sort cn/` followed by `delete 1 4 5` deletes the 1st, 4th and 5th persons in the contacts list when sorted by case
* `sort n/` followed by `delete 2` deletes the 2nd person in the persons list when sorted by name.
* `sort cn/` followed by `delete 1 4 5` deletes the 1st, 4th and 5th persons in the persons list when sorted by case
number.
* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command, if any.

Expand All @@ -176,19 +176,19 @@ Format: `list`

### Sorting all persons : `sort`

Sorts the contacts list based on the specified field prefixes.
Sorts the persons list based on the specified field prefixes.

Format: `sort [n/DIRECTION] [cn/DIRECTION] [sh/start:DIRECTION] [sh/end:DIRECTION]`

* Sorts the contacts list from the first to the last specified field prefix.
* Sorts the persons list from the first to the last specified field prefix.
* At least one field prefix must be specified.
* Direction "asc" indicates ascending order and "dsc" indicates descending order.
* Specifying the sort direction is optional. By default, field prefixes are sorted in ascending order.

Examples:
* `sort n/` sorts the contacts list by name (in ascending order by default).
* `sort sh/end:dsc` sorts the contacts list by end date of SHN period in descending order.
* `sort sh/start: cn/asc` sorts the contacts list by start date of SHN period (in ascending order by default), then by case number in ascending order.
* `sort n/` sorts the persons list by name (in ascending order by default).
* `sort sh/end:dsc` sorts the persons list by end date of SHN period in descending order.
* `sort sh/start: cn/asc` sorts the persons list by start date of SHN period (in ascending order by default), then by case number in ascending order.

### Clearing all persons : `clear`

Expand Down Expand Up @@ -279,7 +279,7 @@ Action | Format, Examples
**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [cn/CASE_NUMBER] [ha/HOME_ADDRESS] [wa/WORK_ADDRESS] [qa/QUARANTINE_ADDRESS] [sh/ADD_SHN_PERIOD] [kn/NEXT_OF_KIN_NAME] [kp/NEXT_OF_KIN_PHONE] [ka/NEXT_OF_KIN_ADDRESS]`<br> e.g., `edit 1 n/Henry Hugh`
**Find** | `find FIELD_PREFIX KEYWORD [MORE_KEYWORDS]`<br> e.g., `find n/James Jake` `find p/123` `find cn/111` `find sh/start:2000-01-01` `find sh/end: 2000-01-02`
**TShift** | `tshift [PLUS_MINUS_SIGN]DAYS`<br> e.g., `tshift 3`
**Delete** | `delete [INDEX] [MORE_INDICES]`<br> e.g., `delete 3` `delete 1 4`
**Delete** | `delete INDEX [MORE_INDICES]`<br> e.g., `delete 3` `delete 1 4`
**List** | `list`
**Sort** | `sort [n/DIRECTION] [cn/DIRECTION] [sh/start:DIRECTION] [sh/end:DIRECTION]`<br> e.g., `sort n/` `sort sort/end:dsc` `sort sh/start: cn/asc`
**Clear** | `clear`
Expand Down

0 comments on commit db5b92a

Please sign in to comment.