Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Blocker
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7
-
Fix Version/s: 4.7
-
Component/s: None
-
Labels:
-
Documentation Required?:None
-
Funding Source:Core Team Funds
Description
This bug affects new smart groups created in 4.7. To reproduce:
- Go to advanced search
- Enter any criteria (with sample data - try Email: "demo" Contact Type: "individual")
- Save as smart group
- Go back and try to edit smart group criteria - adv. search form will be blank instead of showing selected options.
- When viewing the smart group, you'll see:
Notice: Undefined index: in CRM_Contact_Selector->getRows() (line 743 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contact/Selector.php). Notice: Undefined property: CRM_Core_DAO::$status in CRM_Contact_Selector->getRows() (line 743 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contact/Selector.php).
- When examining the civicrm_saved_search table, the column form_values looks very wrong compared to the way they were stored in 4.6 and earlier.
My guess as to what's going on is that the refactoring of the search query layer in 4.7 didn't take smart groups into account and the form values are getting transformed into query object format a bit too aggressively. In order to save a smart group we need to store the original form values so that the search form can get populated again when we try to edit.