Skip to content

Conversation

@hentrymartin
Copy link
Collaborator

What's in this PR?

  • Now, payments report send results only for billing account "80000062"(topgear only)
  • Also, it sends the user_id associated with the payment

Ticket link - https://topcoder.atlassian.net/browse/PM-3108

ON pr.payment_release_id = pra.payment_release_id
WHERE p.created_at >= $1::timestamptz
AND p.created_at <= $2::timestamptz
AND p.billing_account = '80000062'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ maintainability]
The hardcoded billing account number '80000062' could be extracted into a parameter or configuration to improve maintainability and flexibility. This would make it easier to change the billing account without modifying the code.

Copy link
Contributor

@jmgasper jmgasper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we joining into payment_release_associations and payment_releases? Can't we get the user_id from winnings.winner_id?

@kkartunov ☝️

@jmgasper jmgasper closed this Dec 1, 2025
@kkartunov
Copy link
Contributor

Why are we joining into payment_release_associations and payment_releases? Can't we get the user_id from winnings.winner_id?

@kkartunov ☝️

Yes, @hentrymartin user id can get from winnings.winner_id as table already joined.

@kkartunov
Copy link
Contributor

Please update your PR.

@kkartunov kkartunov reopened this Dec 1, 2025
@jmgasper
Copy link
Contributor

jmgasper commented Dec 1, 2025

@kkartunov - I tweaked this update and sent it to prod, so all good. Wanted to get it done before I was out for a couple of days.

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.

4 participants