Skip to content

Commit

Permalink
Merge pull request #18480 from eileenmcnaughton/dom_org
Browse files Browse the repository at this point in the history
dev/core#2039 Set is_primary to 1 on email, address for domain contacts
  • Loading branch information
seamuslee001 authored Sep 16, 2020
2 parents a1f3392 + 839e7bf commit f5ab322
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
66 changes: 33 additions & 33 deletions sql/civicrm_generated.mysql

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions sql/test_data_second_domain.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ SELECT @addId := id from civicrm_address where street_address = '15 Main St';

INSERT INTO civicrm_email (contact_id, location_type_id, email, is_primary, is_billing, on_hold, hold_date, reset_date)
VALUES
(@contactID, 1, '"Domain Email" <domainemail2@example.org>', 0, 0, 0, NULL, NULL);
(@contactID, 1, 'domainemail2@example.org', 1, 0, 0, NULL, NULL);

SELECT @emailId := id from civicrm_email where email = 'domainemail2@example.org';

INSERT INTO civicrm_phone (contact_id, location_type_id, is_primary, is_billing, mobile_provider_id, phone, phone_type_id)
VALUES
(@contactID, 1, 0, 0, NULL,'204 555-1001', 1);
(@contactID, 1, 1, 0, NULL,'204 555-1001', 1);

SELECT @phoneId := id from civicrm_phone where phone = '204 555-1001';

Expand Down
2 changes: 1 addition & 1 deletion xml/templates/civicrm_data.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SET @contactID := LAST_INSERT_ID();

INSERT INTO civicrm_email (contact_id, location_type_id, email, is_primary, is_billing, on_hold, hold_date, reset_date)
VALUES
(@contactID, 1, 'fixme.domainemail@example.org', 0, 0, 0, NULL, NULL);
(@contactID, 1, 'fixme.domainemail@example.org', 1, 0, 0, NULL, NULL);

INSERT INTO civicrm_domain (name, version, contact_id) VALUES (@domainName, '2.2', @contactID);
SELECT @domainID := id FROM civicrm_domain where name = 'Default Domain Name';
Expand Down

0 comments on commit f5ab322

Please sign in to comment.