Bug 29874: Remove unused method C4::SIP::ILS::Item::fill_reserve
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 13 Jan 2022 12:54:33 +0000 (09:54 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 11 Feb 2022 00:44:23 +0000 (14:44 -1000)
This patch removes the unused method.

Likely a leftover from ancient ages. AddIssue already fills the hold and
is called in the Checkout.pm library.

To test:
1. Run:
   $ git grep fill_reserve
=> FAIL: Notice it is only mentioned in the line that defines it
2. Apply this patch
3. Repeat 1
=> SUCCESS: Removed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/SIP/ILS/Item.pm

index a85a557d007f49ded94742be2f351b34228b6150..a97eb62d35bf92afbf3ef75b34a6308fb0f1eb19 100644 (file)
@@ -403,19 +403,6 @@ sub barcode_is_borrowernumber {    # because hold_queue only has borrowernumber.
     return unless $converted;
     return ($number == $converted);
 }
-# FIXME: This methods is very likely not used. It's only reference in the codebase
-#        is itself. I'm 'fixing' it so we can remove ModReserveFill. But filing a bug
-#        for properly removing it.
-sub fill_reserve {
-    my $self = shift;
-    my $hold = shift or return;
-    foreach (qw(biblionumber borrowernumber reservedate)) {
-        $hold->{$_} or return;
-    }
-
-    my $hold_obj = Koha::Holds->find( $hold->id );
-    return $hold_obj->fill;
-}
 
 =head2 build_additional_item_fields_string