nus-cs2103-AY1718S1 / forum

Discussion Forum
5 stars 0 forks source link

Flexible add Command #126

Open sushinoya opened 7 years ago

sushinoya commented 7 years ago

Here is the PR which includes the implementation details: https://github.com/CS2103AUG2017-F09-B1/main/pull/15

A few weeks back I added a feature which allows users to add contacts with "incomplete" add commands. Instead of having to write the full add command which includes name, email, address and phone number, now a user can just add the fields that they know and the rest will be set to the default value of "Not Set".

The feature seems rather trivial but I can imagine that almost never do we have all the information about a person when adding him or her to our contacts.

Tests for all new implementations have been included and the old tests and validations (such as the regex which tests for validity of an email) modified to accommodate this feature.

glenice

A suggestion would be to modify the AddressBook UI such that the fields which are "Not Set" are not shown to the user.

Esilocke commented 7 years ago

Hello! I did something similar to this a few weeks back. Instead of "Not Set", I used "" as a placeholder value instead, which made the field invisible. https://github.com/CS2103AUG2017-W09-B2/main/pull/14