While working on #2247703: Scheduling cancellations doesn't work properly for prepaid licenses, I found that refreshing the order after actually revoking a license (before charging it) caused metered usage to be wrong. This was because it was using a previous revision that had its revision_ended
time set to the time the license was saved and not the end of the billing cycle, like it normally is when it's the active revision.
This patch adds the instrumentation for modules to tell ::saveRevision()
to preserve the revision_created
that they have set, and not to reset it.
It also uses that as the basis for revision_ended
in the database.
Comment | File | Size | Author |
---|---|---|---|
#2 | commerce_license_2736709_revision_created_override.patch | 1.39 KB | wizonesolutions |
Comments
Comment #2
wizonesolutionsHere's the patch.
Comment #3
wizonesolutionsComment #4
Lord Pachelbel CreditAttribution: Lord Pachelbel commentedThis patch worked for me.
Comment #5
Kazanir CreditAttribution: Kazanir at Platform.sh commentedThis should be handled properly as part of the patch in #2653336.
Comment #6
wizonesolutions