Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.13, 4.6.14
-
Fix Version/s: None
-
Component/s: CiviCRM Search
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
After upgrading from 4.6.12 to 4.6.14 I found that a smart group contained no contacts. I tracked it down to legacyConvertFormValues() in CRM/Contact/BAO/Query.php and commenting out the call of this function from convertFormValues() fixed it.
Editing the smart group search group criteria finds the right contacts but they are lost when the smart group is updated. One of the membership type ids was 1 which meant that it was reformatted/selected in the call to formatArrayKeys().
When editing, the $values array looked like this and was untouched:
Array ( [IN] => Array ( [0] => 5 [1] => 3 [2] => 1 [3] => 4 ) )
When saving the smart group, $values looked like this:
Array ( [0] => 5 [1] => 3 [2] => 1 [3] => 4 )
and so was converted to:
Array ( [0] => 2 )
Sorry, I don't know enough to be able to handle the pre-4.6 case properly while not knackering the valid 4.6 case.
This issue may well affect 4.7 as well.
Attachments
Issue Links
- is supplemented by
-
CRM-18435 Membership type smart group (from < 4.6) stops working in 4.6.15
- Done/Fixed
- links to