Ambrose's Project Portfolio Page
Project: SWEe-book
SWEe-book is a desktop application used for contact and task management pertaining to CS2103T and CS2101 module. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java.
Given below are my contributions to the project.
- Enhancements to existing features:
- Implement listTasks to reflect in GUI, so that both contacts and tasks are simultaneously displayed #49
- New Feature: Added the ability to list all tasks added. #37, #46, #50
- What it does: Allows the user to list all tasks that were previously added to the project.
- Justification: This feature allows users to view their added tasks, and serves as a start point fetch data for filterTasks and also the tasks appearing on the UI on startup.
- Highlights: Upon the editing of the UI to include the task section, the tasks are reflected in the GUI rather than the CLI.
- New Feature: Added the ability to add recurring frequencies to tasks. #59
- What it does: Allows the user to add recurring frequencies to their tasks which can be weekly, monthly, or yearly frequencies. For weekly, the tasks are repeated on the same day of the week, for monthly the tasks are repeated by the date (DD) every month, for yearly the tasks are repeated by the DD/MM every year.
- Justification: This feature allows the user to add tasks that can repeat themselves, so that the tasks can update themselves automatically.
- Highlights: The tasks are updated on the startup of the application, ensuring they are always updated whenever the user opens the application.
-
Code contributed: RepoSense link
- Project management:
- Merged and fixed style errors on pull request #5 and #139 into the team’s repository
- Documentation:
- User Guide:
- Added initial documentation for
addTask
,deleteTask
,listTasks
,filterTasks
,sortTasks
- Added full documentation for
listTasks
- Updated command summary
- Updated documentation for
addTask
(explain recurring field), add screenshots
- Added initial documentation for
- Developer Guide:
- Added documentation for implementation of
recurring
feature inTask
- Including sequence diagram and activity diagram for recurring frequency
- Added documentation for implementation of
- User Guide:
- Community:
- Helped to spot bugs in Practical Examinations - Dry Run (PE-D) Issues
Contributions to the Developer Guide (Extracts):
Recurring Tasks feature
Implementation
The recurring task feature allows users to add tasks that can be repeated by week, month, or year. It is facilitated
by RecurringFrequency
, which is a optional component of Task
. Additionally, the following operations are implemented
in Task
, TaskList
, TaskRecords
and Date
:
Task#updateRecurringTaskDate()
- Task updates its Date to the current week/month/year, based on the recurringFrequency of the Task.Date#isLastWeek()
,Date#isLastMonth()
,Date#isLastYear()
- Checks current Date of Task against real-time date.Date#getDateForThisWeek()
,Date#getDateForThisMonth()
,Date#getDateForThisYear()
- Updates Date to be within current week/month/year.TaskList#updateRecurringTasksDates()
- Iterates through list of Tasks and updates its Date if Task is recurring.TaskRecords#updateRecurringTasks()
- Calls for TaskList to update recurring Tasks.
TaskRecords#updateRecurringTasks()
is used in the ModelManager
on boot-up of the application to update all Tasks, if
required. Below is a sequence diagram after the initialisation of the ModelManager
:
Do note that Date
is required for a Task
to be recurring. Notably, Date
is optional for Todo
.
Given below is an example usage scenario of how a recurring task is added and how it behaves upon re-launching of the SWEe-book application.
- Step 1. The user launches the application. A recurring
Task
is added, where the user specifies therecurringFrequency
to be weekly, and theDate
to be from the previous week. TheTask
is added, but theDate
is not updated yet, even if it is not of the current week. TherecurringFrequency
of the task is marked asweek
. - Step 2. The user re-launches the application.
ModelManager
callsTaskRecords#updateRecurringTasks()
, which then callsTaskList#updateRecurringTasksDates()
, which then callsTask#updateRecurringTaskDate()
on the task added. Since theTask
added was recurring (itsrecurringFrequency
is marked asweek
, itsDate
is updated to the current week, with the same day. - Step 3. The user then launches the application a week after. The
Task
is updated similarly to Step 2, and since it is checked against real-time, it is updated to the current week.
Given below is an activity diagram when a user adds a recurring task and restarts his SWEe-book application.
Alternative considerations
- Alternative 1: Let the user choose when to refresh his tasks to their new dates, rather than on start-up of the
application.
- Pros: Allows user more control over their recurring tasks
- Cons: Less intuitive since tasks are not updated to real-time, having a refresh command just for recurring tasks is not ideal.
Contributions to the User Guide (Extracts):
Adding a Task : addTask
Adds a new task to SWEe-book.
Format: addTask d/DESCRIPTION g/GROUP type/TYPE [date/DATE] [pty/PRIORITY] [recurring/RECURRING_FREQUENCY]
GROUP
refers to one of the 2 groups:CS2101
orCS2103T
TYPE
refers to one of the 3 types of tasks:todo
,event
ordeadline
DATE
is in YYYY-MM-DD format and is only needed for events or deadlines (i.e.DATE
is optional for Todo tasks)PRIORITY
refers to one of the 3 levels of priorities / importance of the task:low
,med
(default) orhigh
RECURRING_FREQUENCY
refers to one of the 3 different frequencies that the task could occur:week
,month
oryear
(whereweek
means that the task is recurring weekly)- Any Task that has a recurring frequency must have a date as well, for example a Todo with recurring frequency must have a date.
Examples:
addTask d/Project meeting g/CS2103T type/todo pty/low
- Add a non-recurring
todo
with no date andlow
priority and task descriptionProject meeting
to the groupCS2103T
- Add a non-recurring
addTask d/Presentation 1 g/CS2101 type/deadline date/2020-11-02 pty/high
- Add a non-recurring
deadline
due on2020-11-02
withhigh
priority and task descriptionPresentation 1
to the groupCS2101
- Add a non-recurring
addTask d/Mock QnA 1 g/CS2101 type/event date/2020-10-02 recurring/month
- Add a
event
that recurs everymonth
with date2020-10-02
and defaultmed
priority and task descriptionMock QnA
to the groupCS2101
- Add a