Bug 19059: Remove CancelReserve - do not log DELETE
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 4 Aug 2017 13:44:56 +0000 (10:44 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 12 Sep 2017 15:42:59 +0000 (12:42 -0300)
There is something wrong with the DELETE log, it should be replaced with
a FILLED log.
Anyway, here we do not want it to be logged.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Reserves.pm
Koha/Hold.pm

index 20ad806..697dd66 100644 (file)
@@ -1020,7 +1020,7 @@ sub ModReserveFill {
         }
     );
 
-    # FIXME Must call Koha::Hold->cancel ?
+    # FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log
     Koha::Old::Hold->new( $hold->unblessed() )->store();
 
     $hold->delete();
index 5c6d000..d27bbae 100644 (file)
@@ -316,7 +316,7 @@ sub cancel {
             $self->cancellationdate(dt_from_string);
             $self->priority(0);
             $self->_move_to_old;
-            $self->delete;
+            $self->SUPER::delete(); # Do not add a DELETE log
 
             # now fix the priority on the others....
             C4::Reserves::_FixPriority({ biblionumber => $self->biblionumber });