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

Update add entry behaviour #61

Conversation

epicfailname
Copy link

Resolves #42
Resolves #43
Resolves part of #19

Summary of changes

  • Rename of Comment to Description
  • Make Title and Description not compulsory fields when adding an Entry
    • Default field is the empty string
    • Empty string is to be seen the value reserved solely for developers
    • Users are disallowed from directly input the empty string in add or edit to an entry
    • This means that the field classes (e.g. Link, Description) have two separate validity regex checks for its String value
      • User input (parser)
      • Contruction
  • Update behavior of Entry's isSameEntry() function
    • This function is mainly used to prevent duplicate entries in entry book
    • Previously used Title and (Comment or Link) for comparison
    • Change to now only use Link for comparison
  • Update Link user-input and construction validation regex to be more permissive
    • For file paths, double forward slashes // to be optional
  • Renames of more variables and function names to align with EntryBook context (not complete)

@coveralls
Copy link

coveralls commented Mar 10, 2019

Pull Request Test Coverage Report for Build 222

  • 158 of 164 (96.34%) changed or added relevant lines in 27 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.4%) to 92.997%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/seedu/address/model/entry/Description.java 10 11 90.91%
src/main/java/seedu/address/model/entry/Entry.java 8 9 88.89%
src/main/java/seedu/address/storage/JsonAdaptedEntry.java 9 10 90.0%
src/main/java/seedu/address/logic/parser/ParserUtil.java 21 24 87.5%
Files with Coverage Reduction New Missed Lines %
src/main/java/seedu/address/logic/parser/ParserUtil.java 1 88.64%
src/main/java/seedu/address/storage/JsonAdaptedEntry.java 2 93.33%
Totals Coverage Status
Change from base Build 221: -0.4%
Covered Lines: 1660
Relevant Lines: 1785

💛 - Coveralls

epicfailname and others added 3 commits March 10, 2019 22:40
Make is more persmissive, such that file paths without double forward slashes are also valid.
Also remove debugging code.
@thomastanck thomastanck self-requested a review March 11, 2019 15:11
@epicfailname epicfailname merged commit 953ba64 into CS2103-AY1819S2-W10-1:master Mar 11, 2019
@rlrh rlrh added this to the v1.2 milestone Mar 12, 2019
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.

5 participants