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

Prevent duplicate IDs and remove leading zeros #116

Merged
merged 4 commits into from
Oct 20, 2020

Conversation

koonweee
Copy link

@koonweee koonweee commented Oct 19, 2020

@codecov
Copy link

codecov bot commented Oct 19, 2020

Codecov Report

Merging #116 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #116   +/-   ##
=========================================
  Coverage     71.38%   71.38%           
  Complexity      423      423           
=========================================
  Files            74       74           
  Lines          1342     1342           
  Branches        133      133           
=========================================
  Hits            958      958           
  Misses          343      343           
  Partials         41       41           
Impacted Files Coverage Δ Complexity Δ
.../java/seedu/address/logic/commands/AddCommand.java 100.00% <ø> (ø) 8.00 <0.00> (ø)
src/main/java/seedu/address/model/animal/Id.java 80.00% <ø> (ø) 6.00 <0.00> (ø)
.../java/seedu/address/model/util/SampleDataUtil.java 68.75% <ø> (ø) 3.00 <0.00> (ø)
...in/java/seedu/address/logic/parser/ParserUtil.java 78.57% <100.00%> (ø) 13.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 f3b0d53...8f53cee. Read the comment docs.

Copy link

@aizatazhar aizatazhar left a comment

Choose a reason for hiding this comment

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

Could you also change the error message (MESSAGE_CONSTRAINTS in Id.java) to mention that leading zeroes are not allowed?

Also need to change the default zookeepbook.json (in SampleDataUtil.java) animal's ids to have no leading zeroes

src/main/java/seedu/address/logic/commands/AddCommand.java Outdated Show resolved Hide resolved
@aizatazhar aizatazhar merged commit 121db53 into AY2021S1-CS2103T-W15-4:master Oct 20, 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.

Prevent adding animals with duplicate ids
2 participants