Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement mark and unmark for tasks #40

Merged

Conversation

nobodyishappy
Copy link

The MarkTask Command

The marktask command mark tasks as done. The command has the following format:

marktask TASK_INDEX

Parameter: TASK_INDEX

  • Must be a numeric string representing a number between 1 and total number of tasks.
  • If the value is not acceptable, the error message The task index provided is invalid is displayed.

If the task is already marked, the command is still accepted and succeeds.

Things to note

  • marktask does not remove the task from the person.

The UnmarkTask Command

The unmarktask command mark tasks as undone. The command has the following format:

unmarktask TASK_INDEX

Parameter: TASK_INDEX

  • Must be a numeric string representing a number between 1 and total number of tasks.
  • If the value is not acceptable, the error message The task index provided is invalid is displayed.

If the task is already unmarked, the command is still accepted and succeeds.

This PR is linked to #6.

@nobodyishappy nobodyishappy added the enhancement New feature or request label Mar 19, 2024
@nobodyishappy nobodyishappy added this to the v1.2 milestone Mar 19, 2024
@nobodyishappy nobodyishappy self-assigned this Mar 19, 2024
Copy link

codecov bot commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 82.79570% with 32 lines in your changes are missing coverage. Please review.

Project coverage is 76.31%. Comparing base (7cf9ff9) to head (9584609).
Report is 17 commits behind head on master.

Files Patch % Lines
...main/java/seedu/address/model/task/TaskStatus.java 54.54% 8 Missing and 2 partials ⚠️
.../java/seedu/address/model/util/SampleDataUtil.java 16.66% 5 Missing ⚠️
...in/java/seedu/address/logic/parser/ParserUtil.java 60.00% 2 Missing and 2 partials ⚠️
...java/seedu/address/model/task/TaskDescription.java 71.42% 2 Missing and 2 partials ⚠️
...c/main/java/seedu/address/model/task/TaskName.java 71.42% 2 Missing and 2 partials ⚠️
src/main/java/seedu/address/ui/TaskCard.java 0.00% 3 Missing ⚠️
src/main/java/seedu/address/ui/PersonCard.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #40      +/-   ##
============================================
+ Coverage     76.03%   76.31%   +0.28%     
- Complexity      495      549      +54     
============================================
  Files            82       92      +10     
  Lines          1565     1744     +179     
  Branches        141      161      +20     
============================================
+ Hits           1190     1331     +141     
- Misses          342      374      +32     
- Partials         33       39       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nobodyishappy nobodyishappy linked an issue Mar 19, 2024 that may be closed by this pull request
Copy link

@breezetall breezetall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

Copy link

@Kaya3842 Kaya3842 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is neat and clean. Approved!

Copy link

@chin-herng chin-herng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM so far! Do modify the UI to display whether a task is done.

@Yskie
Copy link

Yskie commented Mar 21, 2024

Looks good to me!

Copy link

@breezetall breezetall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that you have created a util class to better facilitate our testing. The code looks good!

@breezetall breezetall merged commit 6f0203d into AY2324S2-CS2103T-W13-4:master Mar 21, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a student, I can mark/unmark the tasks as done/not done
5 participants