dev/membership#27 Update outdated membership statuses in preProcess rather than submit
authoreileen <emcnaughton@wikimedia.org>
Mon, 28 Sep 2020 00:05:38 +0000 (13:05 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 28 Sep 2020 00:20:27 +0000 (13:20 +1300)
commit094ff61f986a292c8acfc69f45aabdb28eb58c39
tree1709cba066f43511c76b129dcdc96058649860d6
parent36fa19408c0a063afa7de8eaf6f07286ba25a404
dev/membership#27 Update outdated membership statuses in preProcess rather than submit

Per https://lab.civicrm.org/dev/membership/-/issues/27 the function fixMembershipBeforeRenew is agreed to be a useful part of this flow
(ie we should set to expired before renewing if that is the correct pre-renewal status). As discussed on that
issue this moves that handling to the pre-process function.

In the process I hit what appears to be an unreleased regression affecting fixMembershipBeforeRenew borking
when changeDate = NULL from https://github.com/civicrm/civicrm-core/commit/2cb6497039fde605f5d64b2fe4fa0548cd5d1e07#diff-f43c8498e32f5b2d68ab27bcd243ca36L1136

The regression only affects master
CRM/Member/BAO/Membership.php
CRM/Member/Form/MembershipRenewal.php
templates/CRM/Member/Form/MembershipRenewal.tpl