Incorrect Max and overage users due to non-12 month subscription length
Problem to solve
When viewing Maximum Users and Users Over License in
/admin, we have a couple of problems:
Primarily: Maximum Users is tied to a fixed 12 month rolling cycle. For some enterprise customers, we do quarterly and semi-annual true-up reviews. While this is OK for the 1st review, subsequent reviews don't work since they may have lowered their utilization - but we're unable to see it, since Maximum Users (and Users Over License) is still reflecting the high watermark from the previous period.
UPDATE 2020-12-01: removing the below portion of the original description for future iteration in #290202:
Secondly, there's no timestamp or date info presented, so we don't have a sense of when a customer went over the limit if they owe a true-up. If we knew which month an instance went over their limit, we could look at users added during that month to give instances a good way to look back on why they went over.
See an explanation of how we are currently calculating Max user count in self-managed here for reference.
ORIGINAL PROPOSAL: On the last day of each month, record the instance's 1) maximum number of users for the month, and 2) how many Users Over License they went. Record 0 if they didn't exceed the seats allocated for their license. Present this in the admin panel UI.
CURRENT PROPOSAL: Change the logic to be for the date range applicable to the subscription start and end which is available on the license.