Skip to content

Commit

Permalink
Fix test that was just added by moving assigning of fieldPossibilitie…
Browse files Browse the repository at this point in the history
…s lower
  • Loading branch information
seamuslee001 committed Sep 2, 2019
1 parent c530758 commit 25237b3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions CRM/Upgrade/Incremental/SmartGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ public function updateGroups($actions) {
*/
public function datePickerConversion($fields) {
$fieldPossibilities = $relativeFieldNames = [];
foreach ($fields as $field) {
$fieldPossibilities[] = $field;
$fieldPossibilities[] = $field . '_high';
$fieldPossibilities[] = $field . '_low';
}
$relativeDateMappings = [
'activity_date_time' => 'activity',
'participant_register_date' => 'participant',
Expand All @@ -77,6 +72,10 @@ public function datePickerConversion($fields) {

foreach ($fields as $field) {
foreach ($this->getSearchesWithField($field) as $savedSearch) {
// Only populate field possibilities as we go to convert each field
$fieldPossibilities[] = $field;
$fieldPossibilities[] = $field . '_high';
$fieldPossibilities[] = $field . '_low';
$formValues = $savedSearch['form_values'];
$isRelative = $hasRelative = FALSE;
$relativeFieldName = $field . '_relative';
Expand Down

0 comments on commit 25237b3

Please sign in to comment.