-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
dev/core#2039 Set is_primary to 1 on email, address for domain contacts #18480
Conversation
(Standard links)
|
sql/test_data_second_domain.mysql
Outdated
@@ -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, '"Domain Email" <domainemail2@example.org>', 1, 0, 0, NULL, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a valid email?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh - you mean the part I didn't change looks weird - yeah it does
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more like that doesn't seem to be a correct data for that column like that looks more appropriate for the option_value.value rather than civicrm_email
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah - I can change that to just the email & add in the regen update if this is otherwise ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seamuslee001 unrelated test fail - but I've fixed ^^ & grabbed in the regenerate sql commit
I'm digging into the places where the code handles is_primary due to duplicate handling/ queries - see https://lab.civicrm.org/dev/core/-/issues/2039 One distraction is that the domain contact's address & email are not marked is_primary. This doesn't make sense to me as they ARE a contact in the DB
c1b598e
to
839e7bf
Compare
Thanks @seamuslee001 - I'll try the tests again |
Overview
dev/core#2039 Set is_primary to 1 on email, address for domain contacts (on new & test installs)
Before
New installs have a contact record for the domain organization. It has an email but the sql that inserts that email uses is_primary = 0
After
New installs have a contact record for the domain organization whose email is marked is_primary
Technical Details
I'm digging into the places where the code handles is_primary due to duplicate handling/ queries
One distraction is that the domain contact's address & email are not marked is_primary. This
doesn't make sense to me as they ARE a contact in the DB
Comments
@seamuslee001 if you think this is straightforward I'l regen the sql & add it in