Add "new verified users" to Monthly Key Metrics Report (LG-11164)#9527
Merged
zachmargolis merged 5 commits intomainfrom Nov 3, 2023
Merged
Add "new verified users" to Monthly Key Metrics Report (LG-11164)#9527zachmargolis merged 5 commits intomainfrom
zachmargolis merged 5 commits intomainfrom
Conversation
- "New verified" means new since the last month changelog: Internal, Reporting, Update monthly key metrics report
- Switch annual to be "fiscal YTD"
aduth
approved these changes
Nov 3, 2023
|
|
||
| def new_verified_user_count | ||
| Reports::BaseReport.transaction_with_timeout do | ||
| Profile.where(active: true).where(activated_at: current_month).count |
Contributor
There was a problem hiding this comment.
Probably an edge case, but would this double-count a user who verified and then re-verified their identity in the same month?
Contributor
Author
There was a problem hiding this comment.
a user can only have one active profile at a time, and we even have that enforced w/ a [user_id, active] unique index in the DB, so it shouldn't double count those users.
Contributor
There was a problem hiding this comment.
Ah, I think I had a brain fart and overlooked the active filter.
Comment on lines
+74
to
+75
| Profile.where(active: true). | ||
| where(activated_at: annual_start_date..annual_end_date). |
Contributor
There was a problem hiding this comment.
Same question as before, though maybe less of an edge case over the course of a year.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎫 Ticket
LG-11164
🛠 Summary of changes
Updates total users count section of Monthly Key Metrics Report
👀 Screenshots