[Koha-bugs] [Bug 4319] waiting and in transit items cannot be reserved

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 9 20:19:33 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4319

--- Comment #77 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Also, when I see:
@@ -1141,18 +1141,9 @@ sub IsAvailableForItemLevelRequest {                     
         }

         return $any_available ? 0 : 1;                                         
+    } else { # on_shelf_holds == 0 "If any unavailable" (the description is
rather cryptic and could still be improved)
+        return $item->{onloan} || IsItemOnHoldAndFound( $item->{itemnumber} ); 
     }
-
-    if ($item->{onloan}) {                                                     
-        return 1;                                                              
-    }                                                                          
-
-    if ( Koha::Holds->search({itemnumber => $item->{itemnumber},               
-                              found => ['W', 'T']})->count ) {                 
-        return 1;                                                              
-    }       

Then:
+sub hasItemswaitingOrInTransit {
+    my ( $self ) = @_;
+
+    if ( Koha::Holds->search({ biblionumber => $self->id,
+                               found => ['W', 'T'] })->count ) {
+        return 1;
+    }

I am pretty sure something is wrong.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list