CRM-17471 Fix issue where updated statuses aren't represented in PseudoConstant, by flushing the cache
Change membershipStatus psuedoConstant to use label column not name
Alter buildSearchForm rather than PseudoConstant to be more safe
$membershipStatus->id = $id;
$membershipStatus->save();
+ CRM_Member_PseudoConstant::flush('membershipStatus');
return $membershipStatus;
}
$membershipStatus = new CRM_Member_DAO_MembershipStatus();
$membershipStatus->id = $membershipStatusId;
$membershipStatus->delete();
+ CRM_Member_PseudoConstant::flush('membershipStatus');
$membershipStatus->free();
}
* @param CRM_Core_Form $form
*/
public static function buildSearchForm(&$form) {
- $membershipStatus = CRM_Member_PseudoConstant::membershipStatus();
+ $membershipStatus = CRM_Member_PseudoConstant::membershipStatus(NULL, NULL, 'label', FALSE, FALSE);
$form->add('select', 'membership_status_id', ts('Membership Status(s)'), $membershipStatus, FALSE,
array('id' => 'membership_status_id', 'multiple' => 'multiple', 'class' => 'crm-select2')
);