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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

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

--- Comment #78 from Marcel de Rooy <[hidden email]> ---
(In reply to Jonathan Druart from comment #77)

> 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.

It might be helpful to explain what you think is wrong. You are comparing
pieces of code here that have different goals.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/