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

Make Address, Email and phone number optional #41

Merged
merged 10 commits into from
Oct 12, 2020

Conversation

WeiJie96
Copy link

@WeiJie96 WeiJie96 commented Oct 3, 2020

Close #13

@WeiJie96 WeiJie96 self-assigned this Oct 3, 2020
@WeiJie96 WeiJie96 changed the title Merge branch 'master' of https://github.com/AY2021S1-CS2103-T16-2/tp Make Address, Email and phone number optional Oct 3, 2020
Let's update the parser and model first, and update the UI later
Fields are compulsory, but insurance agents may not get the info
all the time.

Let's make them optional by using null,
and save them as null in the JSON storage,
and not display the field if it is not present
# Conflicts:
#	src/main/java/seedu/address/logic/commands/AddCommand.java
#	src/main/java/seedu/address/model/person/Person.java
#	src/main/java/seedu/address/ui/PersonCard.java
#	src/main/resources/view/PersonListCard.fxml
#	src/test/java/seedu/address/logic/parser/AddCommandParserTest.java
#	src/test/java/seedu/address/storage/JsonAdaptedPersonTest.java
#	src/test/java/seedu/address/testutil/PersonBuilder.java
@codecov-io
Copy link

codecov-io commented Oct 12, 2020

Codecov Report

Merging #41 into master will decrease coverage by 0.58%.
The diff coverage is 72.72%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #41      +/-   ##
============================================
- Coverage     72.52%   71.93%   -0.59%     
- Complexity      408      421      +13     
============================================
  Files            71       71              
  Lines          1263     1290      +27     
  Branches        130      147      +17     
============================================
+ Hits            916      928      +12     
- Misses          312      318       +6     
- Partials         35       44       +9     
Impacted Files Coverage Δ Complexity Δ
.../java/seedu/address/logic/commands/AddCommand.java 100.00% <ø> (ø) 8.00 <0.00> (ø)
src/main/java/seedu/address/ui/PersonCard.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../java/seedu/address/storage/JsonAdaptedPerson.java 89.09% <71.42%> (-10.91%) 12.00 <0.00> (ø)
...c/main/java/seedu/address/model/person/Person.java 86.88% <79.31%> (-8.77%) 32.00 <5.00> (+10.00) ⬇️
...a/seedu/address/logic/parser/AddCommandParser.java 100.00% <100.00%> (ø) 5.00 <0.00> (ø)
...in/java/seedu/address/logic/parser/ParserUtil.java 97.72% <100.00%> (+0.16%) 19.00 <9.00> (+3.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 b354898...74712b4. Read the comment docs.

@WeiJie96 WeiJie96 marked this pull request as ready for review October 12, 2020 13:18
Copy link

@Joven-Heng Joven-Heng left a comment

Choose a reason for hiding this comment

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

Note: [] is optional, ... is list.

LGTM

@ijavierja ijavierja merged commit 72de587 into AY2021S1-CS2103-T16-2:master Oct 12, 2020
@WeiJie96 WeiJie96 deleted the optional-fields branch October 12, 2020 17:23
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.

Make Address, Email and phone number optional
4 participants