Loading
Issue #3466297: Licenses under renewal in progress do not expire
Closes #3466297
Adding a renewable license's variation to a cart moves the license to renewal_in_progress. The workflow had no transition from there to expired, so the commerce_license_expire job failed for every such license and it kept what it grants indefinitely — a customer could keep access by adding the renewal to a cart and never paying.
Based on patch #2 from the issue:
expireis allowed fromrenewal_in_progressas well asactive.License::preSave()revokes when the license leaves either granting state (active,renewal_in_progress); moving between the two revokes nothing. The condition from the patch is reduced to one strict check.
LicenseCronExpiryTest::testLicenseExpireJobUnderRenewal() starts a renewal on an already-expired license and runs the expire job: without the fix the job fails and the license stays in renewal_in_progress; with it the license is expired and revoked. Starting the renewal is asserted not to revoke.