From cf8c3d372f58c2fc61e594c431fd1fd3c81f7407 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 5 Jan 2015 10:10:57 -0500 Subject: [PATCH] Bug 13516: Display issue for search results with items both checkout out and lost If the staff search results, if an item is both checked out and lost, the result will appear as two item lines where one line has the lost status and the other line has the rest of the item's data. Test Plan: 1) Check an item out to a patron 2) Mark the item as lost *without* removing the item from the patron's record, either by using longoverdue.pl or by editing the itemlost field in the database directly. 3) Perform a search where that item will be in the results 4) Note the improper display of the item's data 5) Apply this patch set 6) Reload the search restults 7) Note the item now displays correctly Signed-off-by: Nick Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 64bb1162b6c34717e0abb07778e38b43b6dd0ab8) Signed-off-by: Chris Cormack --- C4/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index 6bbdeb9fdf..3f2c12392f 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -2112,7 +2112,7 @@ sub searchResults { # if something's checked out and lost, mark it as 'long overdue' if ( $item->{itemlost} ) { - $onloan_items->{$prefix}->{longoverdue}++; + $onloan_items->{$key}->{longoverdue}++; $longoverdue_count++; } else { # can place holds as long as item isn't lost -- 2.39.5