From 8c9892150f7596056bc5b0a1d506ba6e62c112d9 Mon Sep 17 00:00:00 2001 From: fusin Date: Sun, 10 Nov 2024 17:57:04 +0800 Subject: [PATCH 1/8] Fix case sensitivity bug --- .../model/event/EventCelebrityMatchesKeywordPredicate.java | 2 +- src/main/java/seedu/address/model/person/Name.java | 2 +- .../address/model/person/NameMatchesKeywordsPredicate.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/seedu/address/model/event/EventCelebrityMatchesKeywordPredicate.java b/src/main/java/seedu/address/model/event/EventCelebrityMatchesKeywordPredicate.java index 3fe56daf2a1..f11acba89bb 100644 --- a/src/main/java/seedu/address/model/event/EventCelebrityMatchesKeywordPredicate.java +++ b/src/main/java/seedu/address/model/event/EventCelebrityMatchesKeywordPredicate.java @@ -16,7 +16,7 @@ public EventCelebrityMatchesKeywordPredicate(String keyword) { @Override public boolean test(Event event) { - return keyword.equalsIgnoreCase(event.getCelebrity().getName().toString()); + return keyword.equals(event.getCelebrity().getName().toString()); } @Override diff --git a/src/main/java/seedu/address/model/person/Name.java b/src/main/java/seedu/address/model/person/Name.java index 4965c5a015a..a6bee8b83c9 100644 --- a/src/main/java/seedu/address/model/person/Name.java +++ b/src/main/java/seedu/address/model/person/Name.java @@ -48,7 +48,7 @@ public boolean isSameName(Name otherName) { } return otherName != null - && otherName.fullName.equalsIgnoreCase(fullName); + && otherName.fullName.equals(fullName); } @Override diff --git a/src/main/java/seedu/address/model/person/NameMatchesKeywordsPredicate.java b/src/main/java/seedu/address/model/person/NameMatchesKeywordsPredicate.java index a18929ed17f..20a511982ac 100644 --- a/src/main/java/seedu/address/model/person/NameMatchesKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/person/NameMatchesKeywordsPredicate.java @@ -16,7 +16,7 @@ public NameMatchesKeywordsPredicate(String keywords) { @Override public boolean test(Person person) { - return keywords.equalsIgnoreCase(person.getName().toString()); + return keywords.equals(person.getName().toString()); } @Override From 6b27a79c2145f1e122285562c1c83eeea4e5f5c2 Mon Sep 17 00:00:00 2001 From: fusin Date: Mon, 11 Nov 2024 16:52:13 +0800 Subject: [PATCH 2/8] Edit UG --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 86e915e33ef..de590fd54f5 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -152,7 +152,7 @@ whose name exactly matches the given keywords. Format: `view person KEYWORD [MORE_KEYWORDS]` -- The search is case-insensitive. e.g. `john` will match `John` +- The search is case-sensitive. e.g. `john` will not match `John` - The order of the keywords matters. e.g. `John Doe` will match `John Doe` but not `Doe John` - Only the **full name** is searched. - Only full words will be matched. e.g. `John` will not match `Johnny` From 2dc842de90caccc4c7afb810aff956449596d970 Mon Sep 17 00:00:00 2001 From: fusin Date: Mon, 11 Nov 2024 17:13:03 +0800 Subject: [PATCH 3/8] Fix blocks --- docs/UserGuide.md | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 44dd2a68ae5..44dadd6d72b 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -29,11 +29,11 @@ If you can type fast, and you need to manage celebrities and their schedules, ** 3. Copy the file to the folder you want to use as the _home folder_ for your TalentHub. -4. Open a command terminal, `cd` to change directory to the folder your TalentHub is in, and use the `java -jar talenthub.jar` command to run the application.
+4. Open a command terminal, `cd` to change directory to the folder your TalentHub is in, and use the `java -jar talenthub.jar` command to run the application. A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
Ui -5. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.
+5. Type the command in the command box and press Enter to execute it. e.g. typing `help` and pressing Enter will open the help window.
Some example commands you can try: - `list person` : Lists all persons. @@ -44,7 +44,7 @@ If you can type fast, and you need to manage celebrities and their schedules, ** - `clear all` : Deletes all events and persons after receiving confirmation from you. -
:warning: **Caution!**
+
:warning: **Caution!**
Running this command will clear all your data in TalentHub. This action is irreversible after confirmation.
@@ -86,7 +86,7 @@ Adds a person to TalentHub. Format: `add person n/NAME p/PHONE_NUMBER [e/EMAIL] [a/ADDRESS] [t/TAG]…​` -
+
**:warning: Person constraints**
@@ -109,13 +109,10 @@ The address and email fields are also optional! Examples: - `add person n/John Doe p/98765432 e/johnd@example.com t/Celebrity` adds a person named `John Doe` with the phone number `98765432`, email address `johnd@example.com` and tag `Celebrity`. -
:pushpin:
-Note that John Doe does not have an address in this example. -
- `add person n/Bernice Yu e/berniceyu@example.com a/Yu Apartment p/99272758 t/Hairdresser` adds a person named `Bernice Yu` and the email address `berniceyu@example.com`, address `Yu Apartment`, phone number `99272758` and tag `Hairdresser`. -
:bulb: **Tip:**
+
:bulb: **Tip: ** You can add the prefixes in any order you want!
@@ -148,7 +145,7 @@ Format: `edit person INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]… - Existing values will be updated to the input values. - When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative. -
+
**:warning: Person constraints**
@@ -159,7 +156,7 @@ Format: `edit person INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]… - A person's phone number must be unique.
-
:bulb: **Tip:**
+
:bulb: **Tip: ** You can delete a person's tags, email or address by leaving their fields empty, like `t/`, `e/` or `a/` respectively!
@@ -248,8 +245,8 @@ Format: `delete person INDEX` - The index refers to the index number shown in the displayed person list. - The index **must be a positive integer** 1, 2, 3, …​ -
:warning: **Caution!**
-When you delete a person, you will also delete events which the person is the celebrity for, and you remove the person from all events' contact lists. This action is irreversible after confirmation. +
:warning: **Caution!**
+When you delete a person, you will also delete events which the person is the celebrity for, and you remove the person from **all** events' contact lists. This action is irreversible after confirmation.
Examples: @@ -280,7 +277,7 @@ Adds an event to TalentHub. Format: `add event n/NAME t/TIME [v/VENUE] c/CELEBRITY [p/POINTS OF CONTACT]…​` -
+
**:warning: Event constraints**
@@ -302,7 +299,7 @@ Examples: - `add event n/Oscars t/2022-03-27 10:00 to 2022-03-27 18:00 v/Dolby Theatre c/Alex Yeoh p/Charlotte Oliveiro p/David Li` adds an event named `Oscars` with the time `2022-03-27 10:00 to 2022-03-27 18:00`, venue `Dolby Theatre`, celebrity `Alex Yeoh` and points of contact `Charlotte Oliveiro` and `David Li`. - `add event n/Hair Cut t/2022-03-27 16:00 to 2022-03-27 18:00 v/Salon c/Bernice Yu` adds an event named `Hair Cut` with the time `2022-03-27 16:00 to 2022-03-27 18:00`, venue `Salon`, celebrity `Bernice Yu` and no points of contact. -
:bulb: **Tip:**
+
:bulb: **Tip: ** You can add the prefixes in any order you want!
@@ -334,14 +331,14 @@ Format: `edit event INDEX [n/NAME] [t/TIME] [v/VENUE] [c/CELEBRITY] [p/POINTS OF - At least one of the optional fields must be provided. - Existing values will be updated to the input values. -
+
**:warning: Event constraints**
- The celebrity and all points of contacts must be existing persons in TalentHub. - You cannot add an event with the same `Celebrity` and overlapping `Time` as an existing event.
-
:bulb: **Tip:** +
:bulb: **Tip: ** You can delete a event's venue or points of contact by leaving their fields empty, like `v/`, `p/` respectively!
@@ -436,7 +433,7 @@ Format: `delete event INDEX` - The index **must be a positive integer** 1, 2, 3, …​
- :bulb: **Tip:** + :bulb: **Tip: ** If you would like to delete all events at once, you can use the clear event command.
@@ -456,8 +453,8 @@ Clears all event entries from the address book after receiving confirmation from Format: `clear event` -
:warning: **Caution!**
-Running this command will clear all events in TalentHub. This action is irreversible after confirmation. +
:warning: **Caution!**
+Running this command will clear **all** events in TalentHub. This action is irreversible after confirmation.
Example: @@ -483,8 +480,8 @@ Example: Clears all entries from TalentHub. -
:warning: **Caution!**
-Running this command will clear all persons and events in TalentHub. This action is irreversible after confirmation. +
:warning: **Caution!**
+Running this command will clear **all** persons and events in TalentHub. This action is irreversible after confirmation.
Format: `clear all` @@ -534,8 +531,8 @@ TalentHub data are saved in the hard disk automatically after any command that c TalentHub data are saved automatically as a JSON file `[JAR file location]/data/talenthub.json`. Advanced users are welcome to update data directly by editing that data file. -
:exclamation: **Caution:** -If your changes to the data file makes its format invalid, TalentHub will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
+
:exclamation: **Warning!**
+If your changes to the data file makes its format invalid, TalentHub will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.

Furthermore, certain edits can cause TalentHub to behave in unexpected ways (e.g., if a value entered is outside of the acceptable range). Therefore, edit the data file only if you are confident that you can update it correctly.
From 296d02b33c1fe01562291087e8d465494e9167d4 Mon Sep 17 00:00:00 2001 From: jhqiu21 <142405039+jhqiu21@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:23:09 +0800 Subject: [PATCH 4/8] Fix typos --- docs/UserGuide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 4d7df8c63c5..080074bfe17 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -249,7 +249,7 @@ When you delete a person, you will also delete events which the person is the ce Examples: -- `list person` followed by `delete person 2` deletes the 2nd person in the address book. +- `list person` followed by `delete person 2` deletes the 2nd person in the TalentHub. - `find person Bernice` followed by `delete person 1` deletes the 1st person in the results of the `find person` command.
@@ -359,7 +359,7 @@ Format: `find event KEYWORD [MORE_KEYWORDS]` - The search is case-insensitive. e.g. `hiking` will match `Hiking` - The order of the keywords does not matter. e.g. `Hair Cut` will match `Cut Hair` - Only full words will be matched. e.g. `Oscar` will not match `Oscars` -- Persons matching at least one keyword will be returned (i.e. `OR` search). +- Persons matching at least one keyword will be returned. e.g. `Hair Hiking` will return `Hair Cut`, `Park Hiking`, `Hiking` Examples: @@ -436,7 +436,7 @@ Format: `delete event INDEX` Examples: -- `list event` followed by `delete event 2` deletes the 2nd event in the address book. +- `list event` followed by `delete event 2` deletes the 2nd event in the TalentHub. - `find event Oscars` followed by `delete event 1` deletes the 1st event in the results of the `find event` command.
From 19f771a642b394aafef65eb1204d48b342a13d86 Mon Sep 17 00:00:00 2001 From: fusin Date: Mon, 11 Nov 2024 17:24:34 +0800 Subject: [PATCH 5/8] Update UG --- docs/UserGuide.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 4d7df8c63c5..8f83ac02dfc 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -110,10 +110,6 @@ Examples: - `add person n/Bernice Yu e/berniceyu@example.com a/Yu Apartment p/99272758 t/Hairdresser` adds a person named `Bernice Yu` and the email address `berniceyu@example.com`, address `Yu Apartment`, phone number `99272758` and tag `Hairdresser`. -
:bulb: **Tip: ** -You can add the prefixes in any order you want! -
-
result for 'add person'
command: add person n/John Doe p/98765432 e/johnd@example.com t/Celebrity
@@ -187,7 +183,7 @@ Examples:
find person -
command: find person john bernice
+
command: find person John Bernice
### Viewing person by name: `view person` @@ -257,13 +253,13 @@ Examples:
command: delete person 7
-
+
f delete person cancelled
Typing N or n and pressing enter would return the following message.
- delete person + delete person
Typing Y or y and pressing enter would return the following message.
@@ -297,10 +293,6 @@ Examples: - `add event n/Oscars t/2022-03-27 10:00 to 2022-03-27 18:00 v/Dolby Theatre c/Alex Yeoh p/Charlotte Oliveiro p/David Li` adds an event named `Oscars` with the time `2022-03-27 10:00 to 2022-03-27 18:00`, venue `Dolby Theatre`, celebrity `Alex Yeoh` and points of contact `Charlotte Oliveiro` and `David Li`. - `add event n/Hair Cut t/2022-03-27 16:00 to 2022-03-27 18:00 v/Salon c/Bernice Yu` adds an event named `Hair Cut` with the time `2022-03-27 16:00 to 2022-03-27 18:00`, venue `Salon`, celebrity `Bernice Yu` and no points of contact. -
:bulb: **Tip: ** -You can add the prefixes in any order you want! -
-
result for 'add event'
command: add event n/Hair Cut t/2022-03-27 16:00 to 2022-03-27 18:00 v/Salon c/Bernice Yu
@@ -402,7 +394,7 @@ This command allows you to filter events based on the exact celebrity name provi Format: `filter event CELEBRITY_NAME` -- The search is case-insensitive. e.g. `bernice yu` will match `Bernice Yu` +- The search is case-sensitive. e.g. `bernice yu` will not match `Bernice Yu` - The order of the keywords matters. e.g. `Bernice Yu` will not match `Yu Bernice` - Only the **full celebrity name** is searched. - Only full name will be matched. e.g. `Ber` will not match `Bernice` From 75e206df4bcecdb94ced721a6eee331647667c5e Mon Sep 17 00:00:00 2001 From: fusin Date: Mon, 11 Nov 2024 17:25:46 +0800 Subject: [PATCH 6/8] Update UG --- docs/UserGuide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 8f83ac02dfc..b8591c82f9a 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -150,7 +150,7 @@ Format: `edit person INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]… - A person's phone number must be unique.
-
:bulb: **Tip: ** +
:bulb: **Tip:** You can delete a person's tags, email or address by leaving their fields empty, like `t/`, `e/` or `a/` respectively!
@@ -328,7 +328,7 @@ Format: `edit event INDEX [n/NAME] [t/TIME] [v/VENUE] [c/CELEBRITY] [p/POINTS OF - You cannot add an event with the same `Celebrity` and overlapping `Time` as an existing event.
-
:bulb: **Tip: ** +
:bulb: **Tip:** You can delete a event's venue or points of contact by leaving their fields empty, like `v/`, `p/` respectively!
@@ -422,7 +422,7 @@ Format: `delete event INDEX` - The index **must be a positive integer** 1, 2, 3, …​
- :bulb: **Tip: ** + :bulb: **Tip:** If you would like to delete all events at once, you can use the clear event command.
From 83338f25afeff14339f9d0a5fe5f1c7484ed534d Mon Sep 17 00:00:00 2001 From: fusin Date: Mon, 11 Nov 2024 17:26:25 +0800 Subject: [PATCH 7/8] Revert change --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index b8591c82f9a..48bee44095b 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -253,7 +253,7 @@ Examples:
command: delete person 7
-
f +
delete person cancelled
Typing N or n and pressing enter would return the following message.
From 765f9ad9c8796add9f603519a94e41e97cb9097a Mon Sep 17 00:00:00 2001 From: fusin Date: Mon, 11 Nov 2024 17:37:16 +0800 Subject: [PATCH 8/8] Update line spaces --- docs/UserGuide.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 63a9cfb8020..22fadf58f1a 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -46,7 +46,7 @@ Having access to both a Command Line Interface (CLI) and a Graphical User Interf Running this command will clear all your data in TalentHub. This action is irreversible after confirmation.
- - `exit` : Exits the app. + - `exit` : Exits the app.
6. Refer to the [Features](#features) below for details of each command. @@ -157,6 +157,7 @@ You can delete a person's tags, email or address by leaving their fields empty, Examples: - `edit person 7 p/91234567 e/ a/123 Clementi Rd` Edits the phone number and address of the 7th person to be `91234567` and `123 Clementi Rd` respectively and clears the email address. + - `edit person 2 n/Bernice Yu a/ t/` Edits the name of the 2nd person to be `Bernice Yu` and clears the address and all existing tags.
@@ -179,6 +180,7 @@ Format: `find person KEYWORD [MORE_KEYWORDS]` Examples: - `find person John` returns `john` and `John Doe` + - `find person john bernice` returns `John Doe`, `Bernice Yu`
@@ -202,6 +204,7 @@ Format: `view person KEYWORD [MORE_KEYWORDS]` Examples: - `view person Bernice Yu` returns the details for `Bernice Yu` + - `view person John Doe` returns the details for `John Doe`
@@ -222,6 +225,7 @@ Format: `filter person TAG` Examples: - `filter person Hairdresser` returns the person with tag `HairDresser`. + - `filter person Celebrity` returns the person with tag `Celebrity`.
@@ -246,6 +250,7 @@ When you delete a person, you will also delete events which the person is the ce Examples: - `list person` followed by `delete person 2` deletes the 2nd person in the TalentHub. + - `find person Bernice` followed by `delete person 1` deletes the 1st person in the results of the `find person` command.
@@ -291,6 +296,7 @@ The venue field is also optional! Examples: - `add event n/Oscars t/2022-03-27 10:00 to 2022-03-27 18:00 v/Dolby Theatre c/Alex Yeoh p/Charlotte Oliveiro p/David Li` adds an event named `Oscars` with the time `2022-03-27 10:00 to 2022-03-27 18:00`, venue `Dolby Theatre`, celebrity `Alex Yeoh` and points of contact `Charlotte Oliveiro` and `David Li`. + - `add event n/Hair Cut t/2022-03-27 16:00 to 2022-03-27 18:00 v/Salon c/Bernice Yu` adds an event named `Hair Cut` with the time `2022-03-27 16:00 to 2022-03-27 18:00`, venue `Salon`, celebrity `Bernice Yu` and no points of contact.
@@ -335,6 +341,7 @@ You can delete a event's venue or points of contact by leaving their fields empt Examples: - `edit event 1 t/2024-03-21 v/Jane's Salon` Edits the time and venue of the 1st event to be `2024-03-21` and `Jane's Salon` respectively. + - `edit event 2 n/Movie Screening v/ p/` Edits the name of the 2nd event to be `Movie Screening` and clears the venue and points of contact.
@@ -357,6 +364,7 @@ Format: `find event KEYWORD [MORE_KEYWORDS]` Examples: - `find event Hiking` returns `Hiking` and `Park Hiking` + - `find event Hair Oscars` returns `Hair Cut`, `Oscars`
@@ -381,6 +389,7 @@ Format: `view event KEYWORD [MORE_KEYWORDS]` Examples: - `view event Oscars` returns the details for `Oscars` + - `view event Hair Cut` returns the details for `Hair Cut`
@@ -404,6 +413,7 @@ Format: `filter event CELEBRITY_NAME` Examples: - `filter event Alex Yeoh` returns the events for celebrity `Alex Yeoh` + - `filter event Bernice Yu` returns the events for celebrity `Bernice Yu`
@@ -429,6 +439,7 @@ Format: `delete event INDEX` Examples: - `list event` followed by `delete event 2` deletes the 2nd event in the TalentHub. + - `find event Oscars` followed by `delete event 1` deletes the 1st event in the results of the `find event` command.