email notifications sent out despite action.hold_request.email_notify being set to false

Bug #869357 reported by Jason Etheridge
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned
Declined for 2.0 by Jason Stephenson
Nominated for 2.1 by Jason Etheridge
Nominated for Main by Jason Etheridge

Bug Description

A/T templates with the hold.available hook do not honor the per hold email_notify column. Filters were mentioned as a way to address this (e.g. /openils/conf/action_trigger_filters.json)

Revision history for this message
Ben Shum (bshum) wrote :

We actually received our first report of this occurring last week sometime. One of our libs showed us a list of patrons in a book club who were all grabbing holds for the same book. The patrons had received email notifications but swore to us that they did not ask for them. Checking the holds, they all appeared to be email_notify = FALSE as the original bug poster notes.

So... confirmed.

Changed in evergreen:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Bill Erickson (berick) wrote :

It may have been me that suggested using filters.. that approach won't work, though, since hold.available is a non-passive hook. Filters do not come into place for non-passive hooks. It looks like we will need a validator instead. Validators are good because they provide admin-UI access. They are limited, though, in that you can only have 1 per event definition. For now, the quickest solution would be to add an event definition parameter for "check email_notify == true" which is checked by the HoldIsAvailable Validator. If it's set, it checks the hold and marks the event invalid (and does not notify) if the email_notify=false on the hold.

Revision history for this message
Simon Mai (simonmai) wrote :

I got the same problem.
When I tried to use solution as Bill mentioned. I got this error in log file:

[2012-11-16 14:16:08] open-ils.trigger [ERR :24763:Event.pm:212:1353096943247580] Event validation failed with No field by the name email_notify in Fieldmapper::action::circulation! at /usr/local/share/perl/5.14.2/OpenILS/Utils/Fieldmapper.pm line 281.

Do you have any idea about this error?

Revision history for this message
Ben Shum (bshum) wrote :

Since it's mentioning the action::circulation table (which doesn't have email_notify in it, this bug pertains to the holds action/triggers), I'm assuming that maybe you may have added the validator to the wrong action/trigger definition?

Revision history for this message
Ben Shum (bshum) wrote :

I thought this bug sounded familiar. It's been fixed in this duplicate bug 927934.

Marking this bug duplicate of that one and therefore resolved.

Revision history for this message
Simon Mai (simonmai) wrote :

Oh, thank for your quick reply, Ben. I'll look at it. Have a nice weekend!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.