Reworked for 3.8.x: When building the query for exports by call
number the script has the logic reversed. It tries to select
records with call numbers less than the starting call number and
greater than the ending call number. This should be reversed.

To test, test an export in an unpatched system. An export by
call number will return an empty file. After applying the patch
an export by call number should give valid results.
---
 tools/export.pl |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/export.pl b/tools/export.pl
index d3d8646..c7f3091 100755
--- a/tools/export.pl
+++ b/tools/export.pl
@@ -102,12 +102,12 @@ if ($op eq "export") {
     }
 
     if ($start_callnumber) {
-        $query .= " AND itemcallnumber <= ? ";
+        $query .= " AND itemcallnumber >= ? ";
         push @sql_params, $start_callnumber;
     }
 
     if ($end_callnumber) {
-        $query .= " AND itemcallnumber >= ? ";
+        $query .= " AND itemcallnumber <= ? ";
         push @sql_params, $end_callnumber;
     }
     if ($start_accession) {
-- 
1.7.9.5
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to