https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4319
Marcel de Rooy <m.de.r...@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #48 from Marcel de Rooy <m.de.r...@rijksmuseum.nl> --- Please squash the patches. I am not sure why you change IsAvailableForItemLevelRequest in the third patch. Please explain. Where is it called in the process? You add: + my $flag = shift; This is not really a clear name ;) Where do you use this parameter ? + if (Koha::Holds->search({itemnumber => $item->{itemnumber}, + found => ['W', 'T']}, + {order_by => {-asc => 'priority'}})) { Why do you order_by if you are interested only in the number ? + return 0; + return GetReserveStatus($item->{itemnumber}) eq "Waiting"; When will you reach this second return ? +my $itemsWaitingOrInTransit = Koha::Holds->search( + { + biblionumber => $biblionumber, + found => ['W', 'T'] + })->count(); + +foreach my $item ( Koha::Items->search(biblionumber => $biblionumber) ) { + $itemsWaitingOrInTransit = 1 if $item->get_transfer; +} If the flag is set, there is no need to start traversing all items or keep doing so. Changing status -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/