From 9a4db3d6bd6688c611b899b6a433c9b9c1e8ea72 Mon Sep 17 00:00:00 2001 From: JasonRay168 Date: Mon, 13 Nov 2023 02:27:48 +0800 Subject: [PATCH 1/3] Update use cases in DG --- docs/DeveloperGuide.md | 243 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 227 insertions(+), 16 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 5df7a6191cd..1364fb63003 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -970,23 +970,226 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli **MSS** -1. User requests to sort employees by given attribute -2. HouR returns the sorted list of employees by given attribute +1. User requests to sort employees by given field and order. +2. HouR returns the sorted list of employees based on given field in given order. Use case ends. **Extensions** -* 1a. User leaves out keyword. +* 1a. User leaves out parameters. * 1a1. HouR shows an error message. Use case returns back to step 1. -* 1b. No attribute matches given attribute. +* 1b. Field is not usable for sorting. * 1b1. HouR shows an error message. Use case returns back to step 1. +* 1c. Order is not asc or desc. + * 1c1. HouR shows an error message. + + Use case returns back to step 1. + +**Use case: Add a leave period for an employee** + +**MSS** + +1. User requests to add a leave period for an employee with a given id from given start date + to given end date. +2. HouR adds the individual dates between the given start and end dates inclusive + as leave appointments for the employee with given id. + + Use case ends. + +**Extensions** + +* 1a. User leaves out parameters. + * 1a1. HouR shows an error message. + + Use case returns back to step 1. + +* 1b. No employee matches given id. + * 1b1. HouR shows an error message. + + Use case returns back to step 1. + +* 1c. Dates are of invalid order or format. + * 1c1. HouR shows an error message. + + Use case returns back to step 1. + +**Use case: Delete a leave period for an employee** + +**MSS** + +1. User requests to delete allocated leaves for an employee with a given id that falls between + given start and end dates. +2. HouR deletes the allocated leave dates that fall between the given start and end dates inclusive + for the employee with given id. + + Use case ends. + +**Extensions** + +* 1a. User leaves out parameters. + * 1a1. HouR shows an error message. + + Use case returns back to step 1. + +* 1b. No employee matches given id. + * 1b1. HouR shows an error message. + + Use case returns back to step 1. + +* 1c. Dates are of invalid order or format. + * 1c1. HouR shows an error message. + + Use case returns back to step 1. + +* 1d. No allocated leaves found between given start and end dates. + * 1d1. HouR shows an error message. + + Use case returns back to step 1. + +**Use case: Edit an allocated leave date for an employee** + +**MSS** + +1. User requests to edit a given allocated leave date for an employee with a given id to the given new leave date. +2. HouR edits the given allocated leave date to the given new leave date for the employee with given id. + + Use case ends. + +**Extensions** + +* 1a. User leaves out parameters. + * 1a1. HouR shows an error message. + + Use case returns back to step 1. + +* 1b. No employee matches given id. + * 1b1. HouR shows an error message. + + Use case returns back to step 1. + +* 1c. Dates are of invalid format. + * 1c1. HouR shows an error message. + + Use case returns back to step 1. + +* 1d. Given allocated date to be edited does not exist. + * 1d1. HouR shows an error message. + + Use case returns back to step 1. + +* 1e. Given new date is already allocated. + * 1e1. HouR shows an error message. + + Use case returns back to step 1. + +**Use case: Listing employees on leave** + +**MSS** + +1. User requests to view a list of all employees on leave on a given date. +2. HouR filters the displayed employee list to only display employees on leave on the given date. + + Use case ends. + +**Extensions** + +* 1a. User leaves out parameters. + * 1a1. HouR shows an error message. + + Use case returns back to step 1. + +* 1b. Dates are in the wrong format. + * 1b1. HouR shows an error message. + + Use case returns back to step 1. + +**Use case: Adding a remark for an employee** + +**MSS** + +1. User requests to add a given remark to an employee with a given employee id. +2. HouR adds the remark to the list of remarks associated with the employee with the given employee id. +3. HouR shows the list of remarks associated with the employee with the given employee id. + + Use case ends. + +**Extensions** + +* 1a. User leaves out parameters. + * 1a1. HouR shows an error message. + + Use case returns back to step 1. + +* 1b. No employee matches given employee id. + * 1b1. HouR shows an error message. + + Use case returns back to step 1. + +**Use case: Deleting a remark for an employee** + +**MSS** + +1. User requests to delete a given remark from an employee with a given employee id. +2. HouR deletes the remark from the list of remarks associated with the employee with the given employee id. +3. HouR shows the list of remarks associated with the employee with the given employee id. + + Use case ends. + +**Extensions** + +* 1a. User leaves out parameters. + * 1a1. HouR shows an error message. + + Use case returns back to step 1. + +* 1b. No employee matches given employee id. + * 1b1. HouR shows an error message. + + Use case returns back to step 1. + +* 1c. Remark does not exist in the list of remarks associated with employee with given employee id. + * 1c1. HouR shows an error message. + + Use case returns back to step 1. + +**Use case: Increasing or decreasing employee overtime hours** + +**MSS** + +1. User requests to increase or decrease number of overtime hours taken by employee with given employee id by a given amount. +2. HouR updates the number of overtime hours taken by employee with given employee id by the given amount. + + Use case ends. + +**Extensions** + +* 1a. User leaves out parameters. + * 1a1. HouR shows an error message. + + Use case returns back to step 1. + +* 1b. No employee matches given employee id. + * 1b1. HouR shows an error message. + + Use case returns back to step 1. + +* 1c. Operation given is neither inc (for increase) nor dec (for decrease). + * 1c1. HouR shows an error message. + + Use case returns back to step 1. + +* 1d. Amount given is not a positive integer. + * 1d1. HouR shows an error message. + + Use case returns back to step 1. + **Use case: Report employee** **MSS** @@ -1008,15 +1211,6 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case returns back to step 1. -**Use case: Clear employee book** - -**MSS** - -1. User requests to clear employee book -2. HouR clears employee book - - Use case ends. - **Use case: Reset field of all employees** **MSS** @@ -1038,6 +1232,24 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case returns back to step 1. +**Use case: Clear employee book** + +**MSS** + +1. User requests to clear employee book +2. HouR clears employee book + + Use case ends. + +**Use case: Open help page** + +**MSS** + +1. User requests to open help page +2. HouR shows a link that the user can copy and paste on a browser + + Use case ends. + **Use case: Exit HouR** **MSS** @@ -1047,7 +1259,6 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case ends. -*{More to be added}* ### Non-Functional Requirements @@ -1578,9 +1789,9 @@ This project has been a very invaluable experience where we got to have a taste One of the things that we are most proud of is the bettering of the UI. Though the change was not very extravagant, the change in colour scheme was a feat in itself since we honestly did not aim to care a lot about our UI. We also managed to add icons beside the employee attributes in each employee card which we believe made it more readable for the users. -Another feature we are proud of is our `report` feature that allows our users to generate reports as txt files for each employee. While it might not contain a lot of information yet, we believe that it was a great starting point considering the time-constraint we had for this project and we plan to extend and further develop this feature, improving the experience for our users. +Another feature we are proud of is our `report` feature that allows our users to generate reports as txt files for each employee. While it might not contain a lot of information yet, we believe that it was a great starting point considering the time-constraint we had for this project, and we plan to extend and further develop this feature, improving the experience for our users. -Overall, we are proud of our project and we believe that we have done our best with all the constraints and challenges we faced. We are happy with the result and believe that our product will meet the needs of our target audience. +Overall, we are proud of our project, and we believe that we have done our best with all the constraints and challenges we faced. We are happy with the result and believe that our product will meet the needs of our target audience. ## Planned Enhancements From 9ac69a12d584cbf4b10b1ddecfb20eabb65ad2e7 Mon Sep 17 00:00:00 2001 From: JasonRay168 Date: Mon, 13 Nov 2023 12:50:58 +0800 Subject: [PATCH 2/3] Create minor changes to use cases in DG --- docs/DeveloperGuide.md | 55 +++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index bbc82e047d6..fa0b298f30b 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -1052,7 +1052,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli **Extensions** -* 1a. User leaves out parameters. +* 1a. User leaves out at least one of field or order. * 1a1. HouR shows an error message. Use case returns back to step 1. @@ -1080,7 +1080,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli **Extensions** -* 1a. User leaves out parameters. +* 1a. User leaves out at least one of employee id, start date, or end date. * 1a1. HouR shows an error message. Use case returns back to step 1. @@ -1095,6 +1095,17 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case returns back to step 1. +* 1d. Leave date to be added already exists. + * 1d1. HouR shows an error message. + + Use case returns back to step 1. + +* 1e. Adding the leave date causes number of leaves + for employee with given employee id to be over 14 days . + * 1e1. HouR shows an error message. + + Use case returns back to step 1. + **Use case: Delete a leave period for an employee** **MSS** @@ -1108,7 +1119,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli **Extensions** -* 1a. User leaves out parameters. +* 1a. User leaves out at least one of employee id, start date, or end date. * 1a1. HouR shows an error message. Use case returns back to step 1. @@ -1139,7 +1150,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli **Extensions** -* 1a. User leaves out parameters. +* 1a. User leaves out at least one of employee id, old leave date, or new leave date. * 1a1. HouR shows an error message. Use case returns back to step 1. @@ -1164,7 +1175,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case returns back to step 1. -**Use case: Listing employees on leave** +**Use case: List employees on leave** **MSS** @@ -1175,7 +1186,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli **Extensions** -* 1a. User leaves out parameters. +* 1a. User leaves out date. * 1a1. HouR shows an error message. Use case returns back to step 1. @@ -1185,19 +1196,19 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case returns back to step 1. -**Use case: Adding a remark for an employee** +**Use case: Add a remark for an employee** **MSS** 1. User requests to add a given remark to an employee with a given employee id. -2. HouR adds the remark to the list of remarks associated with the employee with the given employee id. -3. HouR shows the list of remarks associated with the employee with the given employee id. +2. HouR adds the remark to the list of remarks associated with the employee with the given employee id and + shows the list to the user. Use case ends. **Extensions** -* 1a. User leaves out parameters. +* 1a. User leaves out at least one of employee id or remark. * 1a1. HouR shows an error message. Use case returns back to step 1. @@ -1207,19 +1218,24 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case returns back to step 1. -**Use case: Deleting a remark for an employee** +* 1c. Remark to be added already exists. + * 1c1. HouR shows an error message. + + Use case returns back to step 1. + +**Use case: Delete a remark for an employee** **MSS** 1. User requests to delete a given remark from an employee with a given employee id. -2. HouR deletes the remark from the list of remarks associated with the employee with the given employee id. -3. HouR shows the list of remarks associated with the employee with the given employee id. +2. HouR deletes the remark from the list of remarks associated with the employee with the given employee id + and shows it to the user. Use case ends. **Extensions** -* 1a. User leaves out parameters. +* 1a. User leaves out at least one of employee id or remark. * 1a1. HouR shows an error message. Use case returns back to step 1. @@ -1238,14 +1254,14 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli **MSS** -1. User requests to increase or decrease number of overtime hours taken by employee with given employee id by a given amount. -2. HouR updates the number of overtime hours taken by employee with given employee id by the given amount. +1. User requests to increase number of overtime hours taken by employee with given employee id by a given amount. +2. HouR increases the number of overtime hours taken by employee with given employee id by the given amount. Use case ends. **Extensions** -* 1a. User leaves out parameters. +* 1a. User leaves out at least one of employee id, operation (inc or dec), and amount. * 1a1. HouR shows an error message. Use case returns back to step 1. @@ -1265,6 +1281,11 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case returns back to step 1. +* 1e. Updating the number of leaves causes the number to exceed 72 or fall below 0. + * 1e1. HouR shows an error message. + + Use case returns back to step 1. + **Use case: Report employee** **MSS** From 549536761d884735144230d86da9733368c6596e Mon Sep 17 00:00:00 2001 From: JasonRay168 Date: Mon, 13 Nov 2023 12:58:28 +0800 Subject: [PATCH 3/3] Change small grammar issue --- docs/DeveloperGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index fa0b298f30b..6d5d944cf97 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -1250,7 +1250,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case returns back to step 1. -**Use case: Increasing or decreasing employee overtime hours** +**Use case: Increase or decrease employee overtime hours** **MSS**