From: Bill Erickson Date: Wed, 29 Oct 2014 21:06:27 +0000 (-0400) Subject: KMAIN-318 Holds count fix X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=24b8b07aeec2c88c125d21b1e440f656917ca5db;p=working%2FEvergreen.git KMAIN-318 Holds count fix Cross-port: ffb13a0 Conflicts: Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm Moved custom rec_hold_count() code to a new rec_hold_count_kcls() to reduce merge conflicts going forward function. --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index 4ba9c3ac42..0a1d023a80 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -4148,7 +4148,7 @@ sub change_hold_title_for_specific_holds { } __PACKAGE__->register_method( - method => 'rec_hold_count', + method => 'rec_hold_count_kcls', api_name => 'open-ils.circ.bre.holds.count', signature => { desc => q/Returns the total number of holds that target the @@ -4166,7 +4166,7 @@ __PACKAGE__->register_method( ); __PACKAGE__->register_method( - method => 'rec_hold_count', + method => 'rec_hold_count_kcls', api_name => 'open-ils.circ.mmr.holds.count', signature => { desc => q/Returns the total number of holds that target the @@ -4309,6 +4309,13 @@ sub rec_hold_count { return new_editor()->json_query($query)->[0]->{count}; } +# moved custom code into separate function to reduce merge conflicts +sub rec_hold_count_kcls { + my($self, $conn, $target_id) = @_; + my $result = new_editor()->json_query({from => ['action.get_hold_count', $target_id]})->[0]; + return [values %$result]->[0]; +} + # A helper function to calculate a hold's expiration time at a given # org_unit. Takes the org_unit as an argument and returns either the # hold expire time as an ISO8601 string or undef if there is no hold