Improve Precision in OpenILS::Application::Trigger::Validator::HoldIsAvailable

Bug #800828 reported by Jason Stephenson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned
2.0
Fix Released
Undecided
Unassigned

Bug Description

Since migration we have gotten several reports of hold email notices going out too early, like days early.

While we have not been able to reproduce this ourselves at the consortium's central site, we have seen some odd data in our holds that we think could be causing this phenomenon. The data appears to be related to migration and possible clean up afterward, and some may be library staff doing things to try and fix some parameter-related issues.

At any rate, along the way, we noticed that the HoldIsAvailable function in OpenILS::Application::Trigger::Validator has relatively loose logic for checking the holds that are really available. We've seen other holds that could potentially meet the current criteria in addition to the one that is actually being placed on hold. (Again, it could be anomalies in our data, and I've addressed the ones that I could find today.)

However, I decided to modify HoldIsAvailable by adding two additional checks: 1 for the presence of a shelf_time on the hold, and 2 for the absence of a fulfillment_time on the hold. (The latter may not be necessary.) I figure a little extra precision wouldn't hurt.

I've given it a cursory test by looking at some holds that were filled on our production server today and filling them on my development server running this code. I got the expected results with output generated for the action trigger event the same as in production.

The code against master is available here:

git://git.evergreen-ils.org:working/Evergreen <email address hidden>/HoldIsReallyAvailable

description: updated
Revision history for this message
Mike Rylander (mrylander) wrote :

Merged into master, rel_2_1 and rel_2_0. Thanks, Jason!

Changed in evergreen:
status: New → Fix Committed
Changed in evergreen:
milestone: none → 2.1.0
status: Fix Committed → Fix Released
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.