-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
bugBreaks something but is not blockingBreaks something but is not blockingf: circulationConcerns the circulation interface or backendConcerns the circulation interface or backend
Description
Bug description:
If a CIPO defines a list of reminders that are not in the correct order in the data (ascending for "overdue" and descending for "due_soon"). The notifications are sent with incorrect parameters because it uses the order of the reminders in the data to know which reminder to use.
Expected behavior:
When sending a circulation reminder-notification, choosing which reminder params to use should be done by ordering the reminders by "delay" (according to the notification type). The order of these reminders in the data is sometimes not coherent.
Steps to Reproduce (very convoluted to reproduce)
- Create a cipo with two "overdue" reminders in this order:
{
"communication_channel": "mail",
"days_delay": 49,
"template": "email/overdue",
"type": "overdue"
},
{
"communication_channel": "patron_setting",
"days_delay": 1,
"template": "email/overdue",
"type": "overdue"
}- This should send a notification by "patron_setting" one day after the due date and one by "mail" 49 days after the dure date.
- Checkout an loan with this CIPO and wait one day after the due date.
- See that the notification is sent by "mail"
Metadata
Metadata
Assignees
Labels
bugBreaks something but is not blockingBreaks something but is not blockingf: circulationConcerns the circulation interface or backendConcerns the circulation interface or backend
Type
Projects
Status
Done