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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wizonesolutions created an issue. See original summary.

wizonesolutions’s picture

wizonesolutions’s picture

Status: Active » Needs review
Lord Pachelbel’s picture

This patch worked for me.

Kazanir’s picture

Status: Needs review » Closed (duplicate)

This should be handled properly as part of the patch in #2653336.

wizonesolutions’s picture