Commit Graph
13 Commits
Author SHA1 Message Date
Tom RochetteandAlexis Saettler 90dc58348c [#1437] Set the default_avatar_color property before saving a contact model. (#1464) 2018-06-12 20:46:49 +02:00
Régis FreydandGitHub 3d1ff3e867 Add support for nickname (#1359) 2018-06-04 18:02:21 -04:00
Tom RochetteandRégis Freyd d2c9c75644 Fix tests to prepare for foreign keys (#1289)
* Fix AccountTest tests.
Update the model factories not to expect a constant value for account_id.
Add various missing relationships in the model factories.

* Fix AddressTest after the addition of foreign keys.

* Fix ContactTest after the addition of foreign keys.
Set contact/account before saving a special date using Contact::setSpecialDate or Contact::setSpecialDateFromAge.

* Fix DayTest after the addition of foreign keys.

* Fix EntryTest after the addition of foreign keys.

* Fix GiftTest after the addition of foreign keys.

* Fix JournalEntryTest after the addition of foreign keys.

* Fix NoteTest after the addition of foreign keys.

* Fix NotificationTest after the addition of foreign keys.

* Fix PetTest after the addition of foreign keys.

* Return the account id and not the account object in many model factories definition.

* Fix ReminderTest after the addition of foreign keys.

* Fix SpecialDateTest after the addition of foreign keys.

* Fix UserTest after the addition of foreign keys.

* Make instead of creating in Contact::logEvent() as we cannot create an event without giving it an account_id.

* Fix ActivityTest after the addition of foreign keys.

* Fix SendNotificationsTest after the addition of foreign keys.

* Fix SendNotificationsTest after the addition of foreign keys.
- Remove the test_it_deletes_the_notification_if_contact_does_not_exist test because on deletion of a contact, all his associated notifications will be deleted due to cascade constraints.

* Fix SendRemindersTest after the addition of foreign keys.
- Remove the test_it_deletes_the_reminder_if_contact_doesnt_exist test because on deletion of a contact, all his associated reminders will be deleted due to cascade constraints.

* Fix TagTest after the addition of foreign keys.

* Update the logic in Contact::removeSpecialDate so that a foreign key constraint is not triggered when removing the associated relation.
Set a the partner gender before saving the partner as the gender is mandatory.
Add the ConvertEmptyStringsToNull middleware.
Set the metThroughId default option as empty so it is converted to null by the ConvertEmptyStringsToNull middleware.
Set the activity_type_id as empty so it is converted to null by the ConvertEmptyStringsToNull middleware.
Mark the Reminder title has required.
2018-05-08 21:33:12 -04:00
Régis FreydandGitHub 586e477bb8 Remove automatic birthday reminder creation when editing a contact (#1275) 2018-05-04 22:59:41 -04:00
Matthew BrownandAlexis Saettler da73a6e15d Add Psalm to check for possibly fatal issues (#973) 2018-04-29 19:11:40 +02:00
Alexis SaettlerandGitHub 6657aeec9a Fix bugs with last commits (#1130) 2018-04-09 21:07:04 +02:00
DannyandRégis Freyd 3ba96cf18b Add UUID instead of actual ID to identify contacts (#777)
Close #381
2018-04-08 14:23:13 -04:00
Régis FreydandGitHub ae521f5226 Refactor relationships (#971) 2018-04-01 20:46:51 -04:00
Alexis SaettlerandGitHub 558515b59a Fix issues proposed by sonar (#986) 2018-03-08 22:37:27 +01:00
Régis FreydandGitHub e78e140b9e Add support for custom genders (#879) 2018-02-04 15:44:26 -05:00
Régis FreydandGitHub 94f8146411 Change how the Journal works (#709) 2017-12-22 14:53:45 -05:00
Régis FreydandGitHub d8bed11785 Add ability to add dates without a year (#677) 2017-12-13 15:38:05 -05:00
Régis FreydandGitHub 84a1461c0f Add the ability to set an external avatar (#662)
This will allow the new Chrome extension for Monica to fetch
contacts from Facebook and retrieve the avatar.
2017-11-27 19:32:45 -05:00