PROJECT: Task Book


Overview

Task Book is a desktop task manager application that is designed for students. It allows users to keep track of the progress of their active tasks and manage their workload accordingly. The goal of Task Book is to improve the user’s productivity through efficient task management. Task Book is optimized for students who prefer to work with a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI).

Summary of contributions

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

  • Major enhancement: Implemented the option to add multiple milestones a selected task.

    • What it does: It allows the user to split up a huge task into smaller, manageable subtasks called milestones.

    • Justification: This feature enables the user to better manage his time and resources by splitting a task up. It will allow the user to ensure that he/she is on track to complete the task by hitting each milestone specified by the user. Furthermore, this creates a sense of progress as the user clears each milestone and serves as a form of motivation for the user to not give up until the task is completed.

    • Highlights: Implementing this feature and command required changes to the UI of the application. It required in-depth knowledge of JavaFX and the ability to use SceneBuilder to assist in developing the UI. The implementation of the UI was too challenging and an alternative solution was required to ensure the UI remained presentable.

  • Minor enhancement: Implemented a sort function for each task such that the milestones for each task are sorted by their ranks. The list of milestones will be displayed in the order that the user should go about doing, starting with the most important milestone(Rank 1) at the top.

  • Code contributed: [Functional/Test code]

  • Other contributions:

    • Project management:

    • Enhancements to existing features:

      • Modified the GUI for each task to include a list of the milestones for that particular task (Pull requests #54, #97)

      • Wrote tests for milestone feature to ensure adequate code coverage(Pull requests #100, #102, #108, #109)

    • Documentation:

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

    • Community:

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

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

Contributions to the User Guide

This section highlights the documentation I contributed towards the User Guide with the aim of providing clear and concise instructions at a level that is easy for the end-user to follow.

Adding a milestone: add_milestone

Have a task that requires a lot of things to be done? Break it up into smaller, more manageable subtasks called milestones!

Adds a milestone to an existing task in the task book
Format: add_milestone i/INDEX m/MILESTONE DESCRIPTION r/RANK

  • Milestone description cannot be longer than 40 characters!

  • Index must be a non-zero, positive integer not greater than the number of tasks currently available in the Task Book!

Examples:

  • add_milestone i/1 m/Q1 - 3 r/1

  • add_milestone i/1 m/Q4 - 6 r/2

  • add_milestone i/1 m/Q7 & 8 r/3

  • add_milestone i/1 m/Diagrams r/4

  • add_milestone i/1 m/References r/5

Before

AddMilestoneCommand before

After

AddMilestoneCommand after

Rank is the level of importance assigned to that particular milestone by the user. Milestones are automatically sorted by rank with the most important one at the top (Rank 1).

Checking off completed milestones [coming in v2.0]

Users will soon be able to strike off (not delete!) their milestones when they have completed them for easier tracking of what they have or have not done!

FAQ

Q: Why do I get this error when I tried to add milestones with a rank of "0" or "-1"?

FAQ invalidRank

A: You can only enter non-zero, positive integers for rank!

Q: Why do I get this error when I tried to add a milestone?

FAQ invalidIndex

A: You can only add milestones to existing tasks! In this case, there is only 1 task entered into the Task Book, hence attempting to add a milestone to index 2 of the Task Book will result in an error!

Contributions to the Developer Guide

This section highlights the technical documentation I contributed towards the Developer Guide. It provides the technical depth and details required for future developers of this application to maintain/expand it.

Add Milestone feature

Current Implementation

Whenever a Task object is created, it will be instantiated with an empty List of Milestone objects.

When the user calls the add_milestone command, he/she will enter an index to select an existing Task and the desired arguments with the appropriate prefixes. (e.g i/ INDEX m/ MILESTONE DESCRIPTION r/ RANK)

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

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

DG AddMilestoneCommand

Design Considerations

Aspect: How to order all the milestones for each task
  • Alternative 1 (current choice): Use an ArrayList to implement a List of Milestone objects for each Task and sort them each time a Milestone is added using a custom comparator.

    • Pros: Easy to implement.

    • Cons: List interface does not prevent adding of duplicate Milestone objects

  • Alternative 2: Use a TreeSet to implement a List of Milestone objects for each Task

    • Pros: Does not allow duplicate Milestone objects to be added.

    • Cons: Requires in-depth understanding of how to use the SortedSet interface.

Aspect: Selecting an existing task to add a milestone to
  • Alternative 1 (current choice): Select an existing Task using the index

    • Pros: Prevents ambiguity when selecting the desired Task using other parameters such as title as the index of each Task is unique and ordered

    • Cons: User has to take time to scroll through the list to find the desired Task which can be quite troublesome and time-consuming if the list is long due to a large number of existing tasks.

  • Alternative 2: Select an existing Task using the title

    • Pros: More convenient for the user as there is no command to search for index of desired Task

    • Cons: May result in confusion especially if there are tasks with very similar title.

Use case: Add tag

MSS

  1. Student requests to add a new tag and provides the index and the tag

  2. TB adds the tag to the selected task

    Use case ends.

Extensions

  • 1a. Student enters an invalid index when list of tasks added is empty

    • 1a1. TB outputs error message for invalid index

      Use case ends.

  • 1b. Student enters index, tag and rank without all the required prefixes

    • 1b1. TB outputs error message for invalid format

      Use case ends.

  • 1c. Student enters an invalid tag

    • 1c1. TB outputs error message for invalid format

      Use case ends.

Use case: remove tag

MSS

  1. Student requests to remove a tag and provides the index and the tag

  2. TB removes the tag from the selected task

    Use case ends.

Extensions * 1a. Student enters an invalid index when list of tasks added is empty ** 1a1. TB outputs error message for invalid index

+ Use case ends.

  • 1b. Student enters index, tag and rank without all the required prefixes

    • 1b1. TB outputs error message for invalid format

      Use case ends.

  • 1c. Student enters an invalid tag

    • 1c1. TB outputs error message for invalid format

      Use case ends.

  • 1d. Student selected the task that doesn’t have the tag indicated

    • 1d1. TB outputs error message for invalid format

      Use case ends.

Use case: select tag

MSS

  1. Student requests to display list of task with the selected tag and provides the tag

  2. TB removes the tag from the selected task

    Use case ends.

    • 1c. Student enters an invalid tag

      • 1c1. TB outputs error message for invalid format

        Use case ends. === Use case: Edit task

MSS

  1. Student requests to edit a selected task by providing its index and the fields with the values to be updated.

  2. TB checks for validity of the index and updates the fields with the values provided.

    Use case ends.

Extensions

  • 1a. Student provided an invalid index

    • 1a1. TB outputs error message

    • 1a2. Student enters a new Edit command

      Use case ends.

  • 1b. Student did not provide any field or values to update selected task

    • 1b1. TB returns an error message

    • 1b2. Student enters a new Edit command

      Use case ends.

  • 1c. Values provided by student results in the exact same task as before it was edited

    • 1c1. TB returns no field edited error message

    • 1c2. Student enters a new Edit command

      Use case ends.

  • 1d. Values provided by student results in an edited task exactly the same as another existing task

    • 1d1. TB returns duplicate task info message

    • 1d2. Student enters a new Edit command

      Use case ends.

Use case: Add milestone

MSS

  1. Student requests to add a new milestone and provides the index, milestone description and rank

  2. TB adds the milestone to the selected task

    Use case ends.

Extensions

  • 1a. Student enters an invalid index when list of tasks added is empty

    • 1a1. TB outputs error message for invalid index

      Use case ends.

  • 1b. Student enters index, milestone description and rank without all the required prefixes

    • 1b1. TB outputs error message for invalid format

      Use case ends.

  • 1c. Student enters duplicate milestone description

    • 1c1. TB outputs error message for duplicate milestone description

      Use case ends.

  • 1d. Student enters duplicate rank

    • 1d1. TB outputs error message for duplicate rank

      Use case ends.

Appendix A: Non Functional Requirements

Here are some conditions that are not explicitly stated in the features that Task Book provides, but are crucial features that allow users to operate the system functionally.

  1. Should work on any mainstream OS as long as it has Java 9 or higher installed.

  2. Should be able to respond within 2 seconds.

  3. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.

  4. Will be offered free for students.

  5. Not built to contain sensitive information due to lack of password protection.

  6. Tasks dated as far as 10 years ago may be difficult to retrieve, unless data is backed up in the cloud storage.

Appendix B: Glossary

Mainstream OS

Windows, Linux, Unix, OS-X

Private contact detail

A contact detail that is not meant to be shared with others

Appendix C: Instructions for Manual Testing

Given below are instructions to test the app manually.

These instructions only provide a starting point for testers to work on; testers are expected to do more exploratory testing.

Launch and Shutdown

  1. Initial launch

    1. Download the jar file and copy into an empty folder

    2. Double-click the jar file
      Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.

  2. Saving window preferences

    1. Resize the window to an optimum size. Move the window to a different location. Close the window.

    2. Re-launch the app by double-clicking the jar file.
      Expected: The most recent window size and location is retained.

{ more test cases …​ }

Selecting a date as a deadline

  1. Select a deadline

    1. Test case: select 1
      Expected: No deadline selected. Message of invalid command format error is shown.

    2. Test case: select dd/1
      Expected: No deadline selected. Message of invalid command format error is shown.

    3. Prerequisite: Select command has not been called before.
      Test case: select 1/1
      Expected: Deadline of 1/1/2018 is selected. Message of select success is shown.

    4. Prerequisite: Select command has not been called before.
      Test case: select dd/1 mm/1
      Expected: Deadline of 1/1/2018 is selected. Message of select success is shown.

    5. Prerequisite: Latest select command selected a deadline with 2020 as year (e.g.1/1/2020)
      Test case: 'select 1/1`
      Expected: Deadline of 1/1/2020 is selected. Message of select success is shown.

    6. Prerequisite: Latest select command selected a deadline with 2020 as year (e.g.1/1/2020)
      Test case: 'select dd/1 mm/1`
      Expected: Deadline of 1/1/2020 is selected. Message of select success is shown.

    7. Test case: select 1/1/2018
      Expected: Deadline of 1/1/2018 is selected. Message of select success is shown.

    8. Test case: select dd/1 mm/1 yyyy/2018
      Expected: Deadline of 1/1/2018 is selected. Message of select success is shown.

    9. Test case: select 29/2/2018
      Expected: No deadline selected. Message of invalid date error is shown.

    10. Test case: select 1/13/2018
      Expected: No deadline selected. Message of invalid date error is shown.

    11. Test case: select 1/1/201
      Expected: No deadline selected. Message of invalid date error is shown.

    12. Test case: select a29/2/2018
      Expected: No deadline selected. Message of deadline contains illegal characters error is shown.

    13. Test case: select 01/01/02018
      Expected: Deadline of 1/1/2018 is selected. Message of select success is shown.

  2. Updated filteredTaskList shown after selecting deadline

    1. Prerequisites: Multiple tasks in the list with different deadlines. At least one task has the deadline of 1/1/2018.

    2. Test case: select 1/1/2018
      Expected: Deadline of 1/1/2018 is selected. Filtered task list only shows tasks with deadline of 1/1/2018.

    3. Test case: select 29/2/2018
      Expected: No deadline selected. Filtered task list will not be updated and will show what is was showing previously.

Deleting a task

  1. Deleting a task while all tasks are listed

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

    2. Test case: delete 1
      Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated.

    3. Test case: delete 0
      Expected: No task is deleted. Error details shown in the status message. Status bar remains the same.

    4. Other incorrect delete commands to try: delete, delete x (where x is larger than the list size) {give more}
      Expected: Similar to previous.

{ more test cases …​ }

Editing a task

  1. Editing a task while all tasks are listed

    1. Prerequisites: List all tasks using list command. Only 3 tasks are in the list.

    2. Test case: edit
      Expected: Task is not edited. Message of invalid command format is shown.

    3. Test case: edit 1
      Expected: Task is not edited. Message of invalid command format is shown.

    4. Test case: edit t/Do CS2113 tutorial
      Expected: Task is not edited. Message of invalid command format is shown.

    5. Test case: edit i/
      Expected: Task is not edited. Message of empty index is shown.

    6. Test case: edit i/1 t/
      Expected: Task is not edited. Message of empty title is shown.

    7. Test case: edit i/1 d/
      Expected: Task is not edited. Message of empty description is shown.

    8. Test case: edit i/1 c/
      Expected: Task is not edited. Message of empty module code is shown.

    9. Test case: edit i/1 p/
      Expected: Task is not edited. Message of empty priority level is shown.

    10. Test case: edit i/1 h/
      Expected: Task is not edited. Message of empty hours is shown.

    11. Test case: edit i/0 t/Do CS2113 tutorial
      Expected: Task is not edited. Message of invalid index (index must be a non-zero unsigned integer) is shown.

    12. Test case: edit i/4 t/Do CS2113 tutorial
      Expected: Task is not edited. Message of invalid task displayed index (the task index provided is invalid) is shown.

    13. Prerequisites: Tasks in list do not have the exact same fields.
      Test case: edit i/1 t/Do CS2113 tutorial
      Expected: Task at index 1 is edited and the original title is replaced by "Do CS2113 tutorial". Message of edit success is shown.

    14. Prerequisites: Task at i/1 is exactly the same another existing task, existingTask, except for the title. The title of existingTask is "Do CS2113 tutorial".
      Test case: edit i/1 t/Do CS2113 tutorial
      Expected: Task is not edited. Message of duplicate task error is shown.

    15. Prerequisites: Task at i/1 has a title of "Do CS2113 tutorial".
      Test case: edit i/1 t/Do CS2113 tutorial
      Expected: Task is not edited. Message of task not edited error is shown.

Adding a task

  1. Select a particular date

    1. Select the date using the select command, or the date-picker in the UI.

    2. Test case: select 11/11/2018
      Expected: Tasks with the similar deadline are listed. Timestamp in the status bar is updated.

  2. Add a task with title, description, priority and expected number of hours entered.

    1. Test case: add t/Do project portfolio d/convert to pdf format p/high h/3 c/CS2101
      Expected: A task will be added to the list, together with the other tasks with the same deadline.

    2. Other incorrect add commands: add or add t/ d/ p/ h/ with compulsory fields not entered or add t/Do coding d/very fun p/midhigh h/1 with invalid priority level.

Saving data

  1. Dealing with missing/corrupted data files

    1. If the file is corrupted due to illegal values in the data

      • Go to data/taskbook.xml and delete the file

    2. If the file is missing:

      • The filename may be incorrect, i.e. not taskbook.xml, or

      • taskbook.xml may not be in the /data folder