Allow overriding membership status temporarily until specific date
Improving membership status override to provide extra options to allow temporary status override.
Instead of having a checkbox called (Override Status?) in membership add/edit/renew form, it will be replaced with a select box that allow the user to choose one of three options :
1- No 2- Override Permanently 3- Override until selected date
If the first option is selected, then the membership will behave as if the old (Override Status?) is unchecked, which means that the membership is subject to membership status rules.
If the 2nd option is selected, then the membership will behave as if the old (Override Status?) is checked, which mean that the membership status is overridden and is not subject to the membership statues rules.
If the 3rd option is selected, then a new field will appear allowing the user to choose a date, in this status, the membership will behave similar to option 2, but when today date is equal or less than the selected date, then the "Update Membership Statuses" scheduled job will automatically convert its status back to No, which means that the membership status is overridden temporarily only for the selected date and after that it will revert back and be subject to membership status rules
Most notable Technical Details :
civicrm_memebership.is_override field is removed, and two alternative fields are added, once is called status_override_type (DEFAULT 0) , and the other is status_override_end_date (DEFAULT NULL).
status_override_type may contain 0 (means no override), 1 (means override Permanently) or 3 (means Override until selected date), where status_override_end_date will contain the override end date in case the status override type is 3 (override until selected date).