PROJECT: Task Book


Overview

This portfolio is to document my contributions to the CS2113T Software Engineering project, Task Book, to showcase my ability to work in a team in terms of writing functionalities, pull requests, adhering to software engineering principles etc.

Task Book is a desktop task management application that is designed for students. The objective of Task Book is to improve users' productivity through efficient task management This is done by enabling busy students to organise their daily tasks, keep track, check, set deadlines, and improve their productivity in the long run. Task Book is is optimized for students who prefer Command Line Interface (CLI), and it has a Graphical User Interface implemented with JavaFX.

Summary of contributions

This section summarises my contributions to the project. These contributions range from simple, minor enhancements to complex, major enhancements..

  • Major enhancement: added the ability to sort tasks in the task management system.

    • What it does: It allows the user to sort the tasks displayed based on the title, description, priority, module codes of the tasks.

    • Justification: This feature improves the product significantly because it provides a convenient way for user to organise the task list based on the order they preferred. It helps to make the task list more reader-friendly for the user. In addition, it allows user to plan their work schedule based on the priorities, deadlines of the tasks. This helps user to improve his productivity.

    • Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis and consideration of user interaction and needs plays a huge part in the sorting manner the function offer. For example, user might prefer tasks to be shown from higher to lower priority. However, if the tasks are sort according to the strings values in the priority level, by lexicographical order, tasks will be shown from lower to higher priority. Therefore, integer values have to be added to the priority levels. In addition, the implementation too was challenging as it required changes in multiple components in the application .

  • Major enhancement: added the ability to defer deadline of tasks in the task management system.

    • What it does: It allows the user to defer the deadline of the tasks easily.

    • Justification: This feature improves the product significantly because it helps to provide a better user experience of the application by enabling user to defer the deadline of their tasks easily by stating the number of days to defer from the deadline, without having to key in the exact dates.

    • Highlights: It required an in-depth understanding of the calendar, knowing which months have 30 days or 31 days, how is the leap year counted and establishing multiple conditional statements to ensure that the deadline is deferred correctly by just entering the number of days to defer . User interaction is a key factor in this function. During the prototype stage, to defer a deadline, it required an exact date from the user. However, through considerations for the user needs, I decided to simplify the process to just keying in the number of days to defer as the objective of taskbook is to help user to better organise their tasks easily.

  • Minor enhancement: Implemented an add tag command which tags can be added to each task.

  • Minor enhancement: Implemented a remove tag command which tags can be removed from each task.

  • Code contributed: Functional/Test code

  • Other contributions:

    • Project management:

    • Enhancements to existing features:

      • Modified the GUI for each task to update the deadline of the selected task (Pull requests #35)

      • Wrote tests for defer deadline feature to ensure adequate code coverage(Pull requests #106, #118)

      • Wrote tests for sort task feature to ensure adequate code coverage(Pull requests #106, #118)

      • Wrote tests for add tag, remove tag, select tag feature to ensure adequate code coverage(Pull requests #106,)

    • Documentation:

      • Did cosmetic tweaks and revised existing contents of the User Guide(Pull requests #118)

    • Community:

      • PRs reviewed (with non-trivial review comments): #18

      • Reported bugs and suggestions for other teams in the class (examples: 1, 2)

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write clear and concise documentation targeting end-users.

Deferring a deadline: defer

Need a way to quickly extend your deadline by a few days or up to a month? You can easily defer the deadline of your task and the deadline will be automatically adjusted.

Defers a deadline for a task
Format: defer i/INDEX dd/DAY

  • Deadline of the selected task will be automatically updated by the number of days deferred from the deadline

  • Selected task must exist in the TaskBook

  • A task cannot be deferred by the number of days if it will result in two similar tasks with the same deadlines.

Examples:

  • defer i/1 dd/04

Before: "defer i/1 dd/1" is entered

DeferDeadlineCommand before

After: deadline for the first task is deferred by 1 day

DeferDeadlineCommand after

Sort the taskbook: sort

Need to view the tasks in a specific order you prefer? For example, you would like the tasks to be displayed from the highest priority, so you can focus your attention on the most importan task at hand? You can sort the tasks based on their priority!

  • Tasks will be sorted in lexicographical order for title and module sorting methods.

  • Tasks will be sorted from higher to lower priority for priority sorting method.

  • Tasks will be sorted in ascending order of deadlines for deadline sorting method.

  • An empty TaskBook will accept the sort command.

  • Sort command uses stable sorting method

  • Two Tasks with equal values will appear in the same order in sorted output as they appear in the input array to be sorted.

Sort the tasks in the task book via priority, deadline, module, or title
Format: sort s/METHOD

Examples:

  • sort s/deadlines

Before: "sort s/deadlines" is entered

SortTaskCommand before

After: The list of tasks is sorted based on ascending order of the deadline

SortTaskCommand after

Selecting a tag: select_tag

Need to view your tasks with the specific tag? For example, viewing all the tasks which are tagged with "homework"? You can easily do it via selecting the tag you want!

Show a list of tasks with the selected tag
Format: select_tag t/TAG

  • Selected tag is case-insensitive.

  • Tag names has to be alphanumeric

Examples:

  • select_tag t/homework

Before: "select_tag t/homework" is entered

SelectTagCommand before

After: A list of tasks with tag "homework" is shown

SelectTagCommand after

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project with the aim of enabling future developers to extend/maintain the application

Defer Deadline feature

Current Implementation

The defer deadline mechanism is facilitated by VersionedTaskBook. The defer deadline command takes in the index prefix with index of the task to be deferred, followed by the deadline prefix with its corresponding number of days which will defer the deadline in the task by the number of days.

The index represents the Task in the list from PersonListPanel displayed in the GUI.

The validity of the input by the user is checked through the DeferDeadlineCommandParser and TaskBookParser. A DeferDeadlineCommand object is returned and the execute() method will be performed. The validity of the index will be checked and the task to be deferred is retrieve using the getFilterTaskList() method. A copy of the task will be instantiated as deferredTask. The deadline of deferredTask will be deferred by the number of days inputted by the user. The validity of the deadline and existence of duplicate tasks will be checked. Task to be deferred will be updated with deferredTask through updateTask() and updateFiteredTaskList() method in the Model Component.

Step 1. The user launches the application. If it is the first time he/she is launching it, the VersionedTaskBook will be initialized with a sample task book data. If the user has already launched it previously and made changes to it, the VersionedTaskBook launched will contain the data that he/she has entered in the previous launch.

Step 2. The user executes defer i/1 dd/1 to defer the deadline of the selected task at index 1 in the list. The defer command obtains the data of the task that the user wants to change based on the input index.

Step 3. The defer command will retrieve and copy the details of the task at index 1 and instantiate a new task deferredTask and defer the deadline by 1 day.

Step 4. The defer command will call Model#updateTask() and update the task at index 1 with the details of deferredTask. Also, Model#updateFilteredTaskList() will be called to update the list that is being shown to the user with the updated task.

Step 5. Lastly, Model#commitTaskBook() will be called causing the modified state of the task book after the defer i/1 dd/1 command executes to be saved in the TaskBookStateList, and the currentStatePointer to be updated.

The following sequence diagram illustrates how the defer command is implemented.

DeferDeadline SequenceDiagram

Design Considerations

Aspect: How should the deadline of the task be deferred
  • Alternative 1 (current choice): Choose to defer the task based on the number of days required and the deadline will be automatically updated.

    • Pros: More user-friendly as it allows user to defer the deadline by the number of days required and the deadline will be automatically updated without the user finding the exact deadline through calendar.

    • Cons: More complex implementation of the feature as multiple conditional statements are required to ensure the deadline is updated correctly by taking into consideration the features of a calendar. For example, which are the months have 30 or 31 days and how is leap year calculated?

  • Alternative 2: Choose to defer the task based on the exact date

    • Pros: Easy implementation of defer deadline command as just have to change the deadline based on users input.

    • Cons: By allowing users to defer the tasks by entering the exact deadline to defer will result in defer deadline command to be similar to edit task as it is simply just editing the task’s deadline by keying in a new deadline.

Use case: Defer deadlines

MSS

  1. Student requests to defer the deadline for an existing task by number of days

  2. TB checks the validity of the index and number of days.

  3. TB updates and display the new deadline for the existing task

    Use case ends.

Extensions

  • 1a. Student wants to defer a deadline for an non-existent task

    • 1a1. TB outputs an error message

  • 1b. Student wants to defer to a invalid deadline for the selected task

    • 1b1. TB outputs an error message

      Use case ends.