Enhanced Billing Timestamp Support

Bug #1748924 reported by Dan Wells on 2018-02-12
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

As discussed at Hack-a-way 2016, rather than continue to try to cram multiple meanings into one timestamp, let's create a complete set of all the useful timestamps for a typical billing.

In this new config, every billing will have a 'create_date', then most (overdues) will also describe when they start and end.

billing_ts is now deprecated, but will continue to exist for backwards compatibility. It will be managed by trigger to approximate its current definition; equal to 'period_end' for overdues, equal to 'create_date' for other billings.

Dan Wells (dbw2) wrote :

Branch for consideration at:


This is a major rethink of some billing timestamp work done locally a few years back (see LP#1422379), and now that it is done, I think we may still end up reimplementing a COALESCE(period_start, create_date) single value in the long run, but we'll see how that plays out.

This branch attempts to make the minimum changes to allow for this DB enhancement. Should this be accepted, I have several other bug fixes which build on the availability of these new values.

tags: added: pullrequest
Dan Wells (dbw2) wrote :

Added pullrequest, but would love more conversation before this goes in. Are we being to conservative in keeping the current meaning of billing_ts, rather than making it a very-close-but-more-intuitive version of itself?

Dan Wells (dbw2) wrote :

After further reflection, I think this branch is an iterative improvement regardless of what happens in the future, so that discussion can happen post-beta or even post-3.1. After churning for years on bug #1422379, any step forward on this would be very welcome!

Jeff Godin (jgodin) on 2018-02-27
Changed in evergreen:
assignee: nobody → Jeff Godin (jgodin)
Jeff Godin (jgodin) on 2018-02-28
Changed in evergreen:
assignee: Jeff Godin (jgodin) → nobody
Jeff Godin (jgodin) on 2018-03-01
Changed in evergreen:
assignee: nobody → Jeff Godin (jgodin)
Jeff Godin (jgodin) wrote :

Running the upgrade script on a copy of production data confirms significant benefit from disabling trigger(s).

Pushed to master in the name of baby steps everywhere -- thanks, Dan!

Changed in evergreen:
status: New → Fix Committed
assignee: Jeff Godin (jgodin) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers