Skip to content

PM-5703: correct dashboard payment and participation data - #116

Merged
jmgasper merged 1 commit into
developfrom
PM-5703
Jul 31, 2026
Merged

PM-5703: correct dashboard payment and participation data#116
jmgasper merged 1 commit into
developfrom
PM-5703

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

What was broken

Unique Members Paid omitted projected TaaS, task, challenge, and engagement payments until payout, so monthly and all-time metrics disagreed with Wallet Admin. Challenge Registrants vs Submitters counted historical resource imports in their April 2026 ingestion month, producing 3,036 registrants instead of the completion cohort used by the Challenge Registrants report.

Root cause

The payment query required PAID status and grouped by payout date. The participation query independently grouped resource and submission timestamps even though imported resources do not preserve their original registration dates.

What was changed

  • Count the latest non-cancelled payment record in its creation month, retaining TaaS and the existing task/challenge/engagement buckets.
  • Cohort Challenge, Marathon Match, and First2Finish participation by the latest actual phase completion date.
  • Count submitters only when a non-deleted submission matches the registered challenge and member.
  • Update dashboard data-definition documentation.

Any added/updated tests

  • Updated SQL regressions for payment status/version/date semantics, supported completion cohorts, and same-challenge/member submission linkage.
  • pnpm test --runInBand src/reports/dashboard — 5 suites, 35 tests passed.
  • pnpm lint — passed.
  • pnpm build — passed.
  • The repository-wide test run completed 338 passing tests and exposed 21 pre-existing failures in unchanged SFDC DTO/service and report-directory specs.

What was broken
Unique Members Paid omitted projected TaaS, task, challenge, and engagement payments until they reached PAID status, making monthly and all-time metrics disagree with Wallet Admin. Challenge participation counted legacy resource imports in the import month, producing an April 2026 registrant spike.

Root cause
The payment query filtered to PAID and grouped by payout date. The participation query grouped resource and submission creation timestamps independently, although imported resources do not preserve their historical registration dates.

What was changed
Count the latest non-cancelled payment record in its creation month while retaining the existing payment buckets and Topgear exclusion. Cohort supported challenges by their latest actual phase completion date, then count unique submitter resources and same-challenge/member non-deleted submissions in that cohort.

Any added/updated tests
Updated dashboard SQL regression coverage for projected payment status/version/date semantics, supported challenge completion cohorts, linked submission membership, and removal of import/submission timestamp grouping. All 35 dashboard tests, lint, and build pass; the repository-wide suite still has 21 pre-existing failures in unchanged SFDC and report-directory specs.
@jmgasper
jmgasper merged commit d3e7ee8 into develop Jul 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant