[Koha-patches] [PATCH] [SIGNED-OFF] Bug 5230: Call number ranges in export don't give expected results.

Nicole Engard nengard at bywatersolutions.com
Fri Feb 11 02:22:27 CET 2011


From: D Ruth Bavousett <ruth at bywatersolutions.com>

If you entered low number and high number, you got only items that *exactly* matched either entry (if any).
If you enter only a low number, you got everying *lower* than that.
If you enter only a high number, you get everything *higher* than that.

This was a greater-than-less-than problem.

Signed-off-by: Nicole Engard <nengard at bywatersolutions.com>
---
 tools/export.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/export.pl b/tools/export.pl
index a1e9a22..4d23d08 100755
--- a/tools/export.pl
+++ b/tools/export.pl
@@ -101,12 +101,12 @@ if ($op eq "export") {
     }
     
     if ( $start_callnumber ) {
-        $query .= " AND biblioitems.biblionumber = items.biblionumber AND itemcallnumber <= ? ";
+        $query .= " AND biblioitems.biblionumber = items.biblionumber AND itemcallnumber >= ? ";
         push @sql_params, $start_callnumber;
     }
     
     if ( $end_callnumber ) {
-        $query .= " AND biblioitems.biblionumber = items.biblionumber AND itemcallnumber >= ? ";
+        $query .= " AND biblioitems.biblionumber = items.biblionumber AND itemcallnumber <= ? ";
         push @sql_params, $end_callnumber;
     }
     if ( $start_accession ) {
-- 
1.5.6.5



More information about the Koha-patches mailing list