This repository has been archived by the owner on Feb 20, 2020. It is now read-only.
WIP: Move funds from archived members to group account #190
+188
−21
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.
@jlopker This builds on the changes from PR #188, so it's not relevant until we have that one reviewed and deployed.
This will fix the problem with funds hidden with archived members.
The idea is to run a daily job that check all archived members in all groups. All archived members with non-zero funds will have their funds transferred to the group account. A mail will be sent to all admins of the group stating this transfer has happened and in the mail will ba a list of all funds transferred.
The transfers should also be visible in the activity tab. Until the activity tab gets data from the
transactions
table, it will look like two allocations, one negative. When we use thetransactions
table it will be a direct transfer from the archived user to the group account.So maybe we consider getting data to the activity tab from the
transactions
table for this change?The point with running a daily job was to ensure that if there's a consistent bug in the system, this job will make sure funds go back were they need to go. Also, it easier for us as we don't have to make specific mails per group, but can let the system send mails to the groups involved.
I've further more introduced a devops_user in the config for environments, where we can specify a mail address. I imagine we use
[email protected]
in production. We will then receive the same mail as is sent to the admins. In this way we can track if this problem occurs again.