-
-
Notifications
You must be signed in to change notification settings - Fork 821
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#2721 [REF] Further divide savedSearchParam loading into the sql functions #20954
Conversation
(Standard links)
|
Test failures look related |
We have 3 types of saved searches - search kit - legacy core searches - legacy custom searches The only information these 3 need to load is the savedSearch details and the group ID (to add in the add & exclude). The wrangling of the params should happen in the getSql functions - which we can think about being in a listener once they have standard inputs & outputs. However, to get to that point we want to standardise those inputs & outputs. This removes only point of randomness - ie savedSearch has a consistent value & the wrangling of what is in it is pushed closer to the relevant functions
yep I messed up a variable - but noting that there is test cover in these functions CRM_Contact_Form_Search_Custom_GroupTest.testCount with data set #15 |
} | ||
if (isset($ssParams['customSearchID'])) { | ||
$sql = self::getCustomSearchSQL($savedSearchID, $ssParams, $addSelect, $excludeClause); | ||
if (!empty($savedSearch['form_values']['customSearchID'])) { |
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.
@eileenmcnaughton is this right why is it buried in form_values?
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 - why is it! But, it is. that form_values field saved to the db is what holds it
ok am comfortable with the unit tests covering us here and reviewed the extraction and seems to make sense merging |
Overview
dev/core#2721 [REF] Further divide savedSearchParam loading into the sql functions
Before
handling for getting the savedSearch params from the saved search all munged up
After
split out to the type of search they relate to
Technical Details
Builds on #20953
Comments