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

dev/core#2039 Fix OpenID::add to ensure is_primary is set #18498

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Sep 17, 2020

Overview

In my efforts to determine the the non-performant line of code that makes sure IM is set is
not required I edited tests to track down when is_primary is not correct & determined it
is missing from the add function - same as #18489 for IM

Before

Calling OpenID::add does not ensure contact has one primary

After

Calling OpenID::add does ensure contact has one primary - further establishing

self::checkPrimaryBlocks(CRM_Utils_Array::value('contact_id', $params));
as redundant

Technical Details

When creating 7 contacts with 7 contributions 18% of the total 393 queries were from that 1 line of code, 12% were for entities that were not created. My goal is to 'prove' the line of code can go - it turns out we needed to fix im & open_id before that is true (whether anyone uses them is an open question.....)

Comments

The 2 other commits are open as separate PRs - this can merge once they are merged
https://lab.civicrm.org/dev/core/-/issues/2039

@civibot
Copy link

civibot bot commented Sep 17, 2020

(Standard links)

@seamuslee001
Copy link
Contributor

@eileenmcnaughton needs a rebase

In my efforts to determine the the non-performant line of code that makes sure IM is set is
not required I edited tests to track down when is_primary is not correct & determined it
is missing from the add function - same as civicrm#18489 for IM
@eileenmcnaughton
Copy link
Contributor Author

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants