Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fine Balance Alerts #5

Open
eby opened this issue Oct 16, 2017 · 1 comment
Open

Fine Balance Alerts #5

eby opened this issue Oct 16, 2017 · 1 comment

Comments

@eby
Copy link
Member

eby commented Oct 16, 2017

There are two parts to this but they can use the same workflow:

  1. An alert that can't be turned off for over $25 of fines. Customizable delivery.
  2. Optional alerts for reaching a certain fine accrual. Could see this being email for smaller amounts and texts for higher so should be possible to have multiple.

Implementing the mandatory alert:

  • There is a hook for penalty.patron_exceeds_fines we could set up in action/triggers for the $25 threshold that then feeds into the notification system. There is a repeatability delay we will need to make sure works properly per patron. This should then catch everything each time the fines are generated.

Implementing the optional alerts:

  • Looks like open-ils.storage.money.open_user_summary.search might do what we need but need to see if it allows searching by patron. Code
  • Need to make sure everyone we would expect shows up in the 'open user' schema
  • If it does then we go through the preferences each day around the time of the fine generation and check each user that has configured the alerts. This way there is little load on the database if few people have done the non-mandatory alert.
@eby
Copy link
Member Author

eby commented Oct 16, 2017

Actually the hook we will probably use is penalty.patron_exceeds_collection_warning which will be set to the $25 anyways.

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

No branches or pull requests

1 participant