From: Galen Charlton Date: Mon, 10 Mar 2014 18:13:16 +0000 (+0000) Subject: Bug 10452: (follow-up) remove duplicate check of damaged status X-Git-Tag: v3.16.00-beta~658 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=67d3985929d70b67e64d5f0c275109b109065d2d;p=koha-ffzg.git Bug 10452: (follow-up) remove duplicate check of damaged status While reviewing the main patch for this bug to verify that the holds queue routines and C4::Reserves had the same conception of when a damaged item could fill a hold request, I noticed that GetItemsAvailableToFillHoldRequestsForBib() duplicated the code for adding an SQL clause to filter out damaged items. This patch removes the duplication and improves the POD for that routine. Signed-off-by: Galen Charlton --- diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index 7062cbe6af..6c364024a9 100755 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -299,6 +299,7 @@ to fill a hold request if and only if: * it is not currently in transit * it is not lost * it is not sitting on the hold shelf + * it is not damaged (unless AllowHoldsOnDamagedItems is on) =cut @@ -330,8 +331,6 @@ sub GetItemsAvailableToFillHoldRequestsForBib { AND (found IS NOT NULL OR priority = 0) ) AND items.biblionumber = ?"; - $items_query .= " AND damaged = 0 " - unless C4::Context->preference('AllowHoldsOnDamagedItems'); my @params = ($biblionumber, $biblionumber); if ($branches_to_use && @$branches_to_use) {