From e3cc2cb77ebfe2ade478d6b7eab1ac21d5809ed8 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 --- C4/Reserves.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 13787fc..7f95a26 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() ) { -- 1.8.3.1