Hold ratios in circ policies cause errors when trying to renew items

Bug #1103706 reported by Kathy Lussier
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.3
Fix Released
Medium
Unassigned
2.4
Fix Released
Medium
Unassigned

Bug Description

We want to prevent renewals on titles with holds, but only if there are no available copies to fill the holds.

To do so, we set up a circ policy at the consortium level with the "renewal" flag set to true and with the "Minimum Available Copy/Hold Ratio to 1. When this circ policy is active, we get the following error message whenever we try to renew an item, regardless of whether there is a hold on the title or not.

The initial error is a network or server failure with the following:

method=open-ils.circ.renew
params=["6150fccc3948b557db1c76b8fdc4e18a",{"barcode":"777776","patron":8}]
THROWN:
{"payload":[],"debug":"osrfMethodException : *** Call to [open-ils.circ.renew] failed for session [1358707558.197945.135870755821330], thread trace [1]:\nException: OpenSRF::EX 2013-01-20T13:45:58 OpenSRF::Application /usr/local/share/perl/5.10.1/OpenSRF/Application.pm:211 : Bad event name: \n\n","status":500}
STATUS:

I then get a message saying the renew failed. The Debug Output is:

Please open a helpdesk ticket and include the following text:
Sat Jan 19 2013 22:10:20 GMT-0500 (Eastern Standard Time)
Renew Failed for 777776
[

    {
        "ilsevent":-1,
        "textcode":"Server or method error"
    }

]

I then get another error with the following in the Debug Output:

Please open a helpdesk ticket and include the following text:
Sat Jan 19 2013 22:11:23 GMT-0500 (Eastern Standard Time)
Error in renew_via_barcode callback\nRenew probably did not happen for barcode 777776
{
    "fileName":"oils://remote/xul/rel_2_3_0/server/patron/items.js",
    "lineNumber":393
}

A similar error was produced when I tried using the Minimum Total Copy/Hold Ratio. If I remove the ratios from the circ rule, then the renewals go through without any problems.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Confirmed it in master and based on the paths in the supplied errors, I'm assuming that it is happening in 2.3.

Changed in evergreen:
milestone: none → 2.4.0-alpha
status: New → Confirmed
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-alpha1 → 2.4.0-beta
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-beta → 2.4.0-rc
importance: Undecided → Medium
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-rc → none
Kathy Lussier (klussier)
description: updated
Revision history for this message
Fredrick Parks (fparks) wrote :

I believe that I have found the source of the error. The method copy_related_hold_stats in the action schema is expecting to receive an integer, but the method that calls it, action.item_user_circ_test, passes a bigint instead. Changing copy_related_hold_stats to accept a bigint as the parameter has resolved the issue for me.

Here is my branch to take a look at.
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=commit;h=c037407661188fe8a149167ce7117ff5fa14993e

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

This looks good, so I'm going to turn it into a pullrequest to get more eyeballs and tuits involved.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.5.0-alpha1
Revision history for this message
Mike Rylander (mrylander) wrote :

Picked into master, 2.4 and 2.3. Thanks, Fredrick!

Changed in evergreen:
status: Confirmed → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
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.