Regression: Fails to create smartgroup or refresh count of group
Overview
Since upgrading to 5.24 creating smart group using 'Date Added to CiviCRM' fails with DB Error: no such table. Also when a smart group is based on 'Date Added to CiviCRM' and try to refresh the count it fails with same error message
Reproduction steps
- Navigate to CiviCRM >> Search >> Custom Searches >> Date Added to CiviCRM
- Do a search on date and include in group.
- Select all contact and try adding to smart group.
- Got an error "Fatal error: DB error".
Current behaviour
Get DB error 'Database Error Code: Table 'dmastercivi_g5lis.civicrm_tmp_e_ig_6f1e2d3b300d50a856f5cb9140996451' doesn't exist, 1146' when trying to create smart group or refresh count
Expected behaviour
smart should be created with correct contacts in it and also when refreshing the group count, the group should show correct count