From 334e00bf5ccea4658365af7a09081d1474fba0b1 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 23 Jul 2013 21:06:30 +0000 Subject: [PATCH] Bug 9394: (follow-up) fix query column alias A change-and-replace went a tick too far. This patch adjusts the column alias in the query run in MergeHolds() to reflect that the value being returned is the number of hold requests, not an ID. To test: [1] This patch should have no visible changes to behavior. To verify, pick to bib records that have hold requests on them, then merge them together. Verify that the merged bib contains sll of the hold requests on it. Signed-off-by: Galen Charlton Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton --- C4/Reserves.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 13787fc109..7f95a26a33 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -2014,7 +2014,7 @@ This shifts the holds from C<$from_biblio> to C<$to_biblio> and reorders them by sub MergeHolds { my ( $dbh, $to_biblio, $from_biblio ) = @_; my $sth = $dbh->prepare( - "SELECT count(*) as reserve_id FROM reserves WHERE biblionumber = ?" + "SELECT count(*) as reserve_count FROM reserves WHERE biblionumber = ?" ); $sth->execute($from_biblio); if ( my $data = $sth->fetchrow_hashref() ) { -- 2.11.0