}
__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
);
__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
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