The logic is wrong when building the query: if ($start_callnumber) { $sql_query .= " AND itemcallnumber <= ? "; push @sql_params, $start_callnumber; } if ($end_callnumber) { $sql_query .= " AND itemcallnumber >= ? "; push @sql_params, $end_callnumber; } The query must include items with call numbers *greater than* the starting call number and *less than* the ending call number, not vice versa.
Created attachment 12592 [details] [review] Bug 8843 - Cannot export bibliographic records by call number 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.
Created attachment 12597 [details] [review] [SIGNED-OFF] Bug 8843 - Cannot export bibliographic records by call number 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. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Works as expected.
QA Comment * trivial bugfix ! * tiny bugfix ! passes QA
Patch pushed to master
Doesn't apply to 3.8.x, please rebase and submit for 3.8.x if needed
Created attachment 13613 [details] [review] Bug 8843 [3.8.x] Cannot export bibliographic records by call number 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.
Created attachment 13646 [details] [review] Bug 8843 [3.8.x] Cannot export bibliographic records by call number 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. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Marking Passed QA so that it will be visible to the 3.8.x RMaint.
Pushed to 3.8.x, will be in 3.8.8, thank you for your effort of rebasing it.