* @return array
*/
public static function updateAllMembershipStatus() {
+ // Tests for this function are in api_v3_JobTest. Please add tests for all updates.
+
+ $updateCount = $processCount = self::updateDeceasedMembersStatuses();
- //get all active statuses of membership, CRM-3984
- $allStatus = CRM_Member_PseudoConstant::membershipStatus();
- $statusLabels = CRM_Member_PseudoConstant::membershipStatus(NULL, NULL, 'label');
$allTypes = CRM_Member_PseudoConstant::membershipType();
- // get only memberships with active membership types
- $query = "
+ // This query retrieves ALL memberships of active types.
+ $baseQuery = "
SELECT civicrm_membership.id as membership_id,
civicrm_membership.is_override as is_override,
+ civicrm_membership.status_override_end_date as status_override_end_date,
civicrm_membership.membership_type_id as membership_type_id,
civicrm_membership.status_id as status_id,
civicrm_membership.join_date as join_date,