https://lab.civicrm.org/dev/core/issues/991
], $defaults);
$this->normalizeDefaultValues($defaults);
+ //991/Subtypes not respected when editing smart group criteria
+ if ($defaults['contact_type'] && !empty($this->_formValues['contact_sub_type'])) {
+ foreach ($this->_formValues['contact_sub_type'] as $subtype) {
+ $basicType = CRM_Contact_BAO_ContactType::getBasicType($subtype);
+ $defaults['contact_type'][$subtype] = $basicType . '__' . $subtype;
+ }
+ }
+
if ($this->_context === 'amtg') {
$defaults['task'] = CRM_Contact_Task::GROUP_ADD;
}