-
-
Notifications
You must be signed in to change notification settings - Fork 814
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] start unravelling the way we retrieve the saved search #20953
Conversation
(Standard links)
|
} | ||
else { | ||
$fv = CRM_Contact_BAO_SavedSearch::getFormValues($savedSearchID); |
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.
In fact I will push this into the following sql functions as a follow up - but it needs to be combined with the line below
@@ -796,7 +796,10 @@ private static function updateCacheFromTempTable(CRM_Utils_SQL_TempTable $groupC | |||
*/ | |||
protected static function insertGroupContactsIntoTempTable(string $tempTableName, int $groupID, ?int $savedSearchID, ?string $children): void { | |||
if ($savedSearchID) { | |||
$ssParams = CRM_Contact_BAO_SavedSearch::getSearchParams($savedSearchID); |
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've basically copied getSearchParams into the appropriate parts of this function so we can start from a clean array
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
Overview
dev/core#2721 [REF] start unravelling the way we retrieve the saved search
Before
We want to get to the point of passing out a consistent $savedSearch array to the 3 sql functions - but it is already inconsistent when it is retrieved into this function
After
Retrieved consistently. Wrangling closer to where it is used (but still needs some sorting)
Technical Details
We have 3 types of saved 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
Comments