dev/core#2079 Eliminate unused query on CRM_Core_BAO_CustomQuery::_construct #18668
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This cleans up unnecessary queries in Contact.get api when custom data is involved. As mentioned _options is deprecated
but still used - more accurately the work wasn't done at the time to determine whether it was.
This time I've gone through and clarified all the places it potentially might have been used
https://github.com/civicrm/civicrm-core/pulls?q=+is%3Apr+dev%2Fcore%232079+
Before
Extraneous queries on every apiv3 or BAO-query object contact.get call, if custom fields involved
After
poof
Technical Details
Easier to do the grep work to confirm once the preliminaries are closed
Only 3 times where this is constructed
Only one of which accesses _options
CRM_Profile_Selector_Listings
is the only place that accesses them -I have grepped universe & checked all references to ->_options - there are a lot but looking at them I am convinced only 3 relate to this variable
TechToThePeople/civisualize#111 &
CRM_Profile_Selector_Listings
&CRM_Contact_Selector
- this PR removes the 2 in core - below is an analysis of the remaining results from searching core for->_options