From 1b79faad5ba3bfadf31320cf9ba865a1d4fe5fb1 Mon Sep 17 00:00:00 2001 From: Srdjan Jankovic Date: Wed, 7 Mar 2012 17:44:01 +1300 Subject: [PATCH] bug_7458: Correct existing existing call numbers retrieval Adjusted to account for duplicate call numbers in the database. Now retrieves next available call number correctly. --- cataloguing/value_builder/callnumber-KU.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/value_builder/callnumber-KU.pl b/cataloguing/value_builder/callnumber-KU.pl index e0fa4445ea..201f9c84e2 100755 --- a/cataloguing/value_builder/callnumber-KU.pl +++ b/cataloguing/value_builder/callnumber-KU.pl @@ -104,7 +104,7 @@ sub plugin { if ( my $first = $dbh->selectrow_array("SELECT itemcallnumber FROM items WHERE itemcallnumber = ?", undef, $padded) ) { - my $icn = $dbh->selectcol_arrayref("SELECT itemcallnumber + my $icn = $dbh->selectcol_arrayref("SELECT DISTINCT itemcallnumber FROM items WHERE itemcallnumber LIKE ? AND itemcallnumber > ? -- 2.39.5