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

Add shift-add and shift-delete commands and make commands case-insensitive #42

Merged
merged 6 commits into from
Oct 10, 2020

Conversation

plosslaw
Copy link

@plosslaw plosslaw commented Oct 9, 2020

Resolves #10
Resolves #12
Resolves #15

Test cases will be added in future commits

@plosslaw plosslaw changed the title Add shift-add and shift-delete command and made commands case-insensitive Add shift-add and shift-delete command and make commands case-insensitive Oct 9, 2020
@plosslaw plosslaw changed the title Add shift-add and shift-delete command and make commands case-insensitive Add shift-add and shift-delete commands and make commands case-insensitive Oct 9, 2020
@codecov-io
Copy link

codecov-io commented Oct 9, 2020

Codecov Report

Merging #42 into master will decrease coverage by 1.49%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #42      +/-   ##
============================================
- Coverage     56.05%   54.56%   -1.50%     
  Complexity      410      410              
============================================
  Files            87       91       +4     
  Lines          1643     1688      +45     
  Branches        183      189       +6     
============================================
  Hits            921      921              
- Misses          684      729      +45     
  Partials         38       38              
Impacted Files Coverage Δ Complexity Δ
.../seedu/address/logic/commands/ShiftAddCommand.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...edu/address/logic/commands/ShiftDeleteCommand.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../seedu/address/logic/parser/AddressBookParser.java 76.19% <0.00%> (-8.03%) 12.00 <0.00> (ø)
...du/address/logic/parser/ShiftAddCommandParser.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...address/logic/parser/ShiftDeleteCommandParser.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71a0809...4db354a. Read the comment docs.

@plosslaw
Copy link
Author

Currently, the shift-add and shift-edit commands do not support role requirements that uses spaces (e.g. Fry Cook) #44

Copy link

@WangZijun97 WangZijun97 left a comment

Choose a reason for hiding this comment

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

LGTM! Good fix on the lower case commands. Added a question, but approving as that comment isn't really about the code you are pushing.

@@ -173,8 +173,8 @@ Format: `shift edit SHIFT_INDEX [d/DAY] [t/TIME] [r/ROLE-NUMBER_NEEDED]...`
* Each role should be accompanied by the number needed, and this number **must be 0 (0 will remove the role from the shift) or a positive integer** 1, 2, 3...

Choose a reason for hiding this comment

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

Just tested with the current master branch code, 0 does not remove the role from the shift yet, but instead shift-edit removes all roles, then add the ones keyed in. Do we want to have the 0 = remove functionality, or just not allow 0 to be keyed in?

Copy link
Author

Choose a reason for hiding this comment

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

I think we'll still go with 0 removing the role

@@ -163,7 +163,7 @@ Format: `shift list`

Edits the details of an existing shift in the McScheduler.

Format: `shift edit SHIFT_INDEX [d/DAY] [t/TIME] [r/ROLE-NUMBER_NEEDED]...`
Format: `shift edit SHIFT_INDEX [d/DAY] [t/TIME] [r/ROLE <SPACE> NUMBER_NEEDED]...`

Choose a reason for hiding this comment

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

Thanks for helping to update the user guide.

@plosslaw plosslaw merged commit 50d0144 into AY2021S1-CS2103-F10-4:master Oct 10, 2020
@WangZijun97 WangZijun97 added this to the v1.2 milestone Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete shifts Add positions to shifts Add shifts
3 participants