Skip to content

Conversation

itsisak
Copy link
Contributor

@itsisak itsisak commented Oct 2, 2024

Currently this checks every day at 2100 if there is any events with overdue payments. If so it gives penalty to the users who have not paid, unregisters them from the event and sends notification.

This is a first draft of the consept. Future improvements should be to check if they paid after the set deadline, not just at 2100. Also the notification to the event creator could be removed if this is solution is satisfactory.

Also im not married to the names like event_payment_overdue_penalty i will try to think of some better, but it is conflicting with the currently existing payment_overdue functionalities (which is more like payment_due)

Resolves ABA-30

@itsisak itsisak self-assigned this Oct 2, 2024
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 95.71429% with 3 lines in your changes missing coverage. Please review.

Project coverage is 89.13%. Comparing base (d49dca9) to head (192746f).
Report is 29 commits behind head on master.

Files with missing lines Patch % Lines
lego/apps/events/notifications.py 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3646      +/-   ##
==========================================
+ Coverage   89.11%   89.13%   +0.02%     
==========================================
  Files         682      683       +1     
  Lines       21464    21533      +69     
==========================================
+ Hits        19128    19194      +66     
- Misses       2336     2339       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@itsisak itsisak force-pushed the automatic-penalty branch from 5744627 to 11f50ab Compare October 9, 2024 20:37
@itsisak itsisak marked this pull request as ready for review October 9, 2024 21:09
@itsisak itsisak requested a review from a team October 9, 2024 21:12
Copy link

linear bot commented Oct 9, 2024

@itsisak itsisak added the review-needed Pull requests that need review label Oct 9, 2024
Copy link
Member

@jonasdeluna jonasdeluna left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Member

@eikhr eikhr left a comment

Choose a reason for hiding this comment

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

@itsisak I think a good first iteration to make this mergable without too much work would be the following:

  • add a field bumped_at to registrations
  • prikk script runs once a day, giving prikk to every person who has not payed after the deadline (and has not already gotten prikk or been bumped in the last 24h)
  • when someone is awarded a prikk, a flag is set on the registration so that we know they have already gotten the payment prikk
  • On the event attendees admin page, this "prikk"-status is shown, so that Arrkom can easily check who has gotten prikk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review-needed Pull requests that need review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants