Trying to use export_records.pl for exporting biblios by biblionumber (through list_id_file option) fails. It exports whole catalogue instead.
Trying to export using a biblionumber file from the staff interface only gives me an empty file. Exporting the same records using the 'form bilbio nubmer' and 'to bilbio number' options works as expected.
Created attachment 48429 [details] [review] Bug 15923: Take the id list file into account when exporting records When exporting records (tools/export.pl or misc/export_records.pl), a file of ids (authid or biblionumber) can be passed to filter the results. Bug 14722 has broken this behavior. Test plan: Export records and specify a list of records to filter the results. Prior to this patch, the record with the id 1 was exported.
Created attachment 48430 [details] [review] Bug 15923: Take the id list file into account when exporting records When exporting records (tools/export.pl or misc/export_records.pl), a file of ids (authid or biblionumber) can be passed to filter the results. Bug 14722 has broken this behavior. Test plan: Export records and specify a list of records to filter the results. Prior to this patch, the record with the id 1 was exported.
Thank for quick patch Jonathan. In user interface it works as expected, but from command line I'm still getting all the record - not filtered by id_list_file.
Hi Josef, thx for the quick testing. If you discover a problem, please feel free to set the status to 'failed qa'.
Thanks Katrin, I'll try to remember it for next time ;)
There is probably problem on another place too. Looking to the code: http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=misc/export_records.pl;h=e6c3d98dd8b62372d321d76aaa30f94b1f7184a0;hb=447b1ea93938319f42031636694a0036913cd83c#l176 176 if ( @record_ids and my $id_list_file ) { 177 my @filter_record_ids = <$id_list_file>; redeclaring variable $id_list_file may be the problem?
Created attachment 48439 [details] [review] Bug 15923: Fix --id_list_file option for misc/export_records.pl
I just c/p stupidly the line to the misc file, but the option was buggy. It should work fine now;
Created attachment 48444 [details] [review] Bug 15923: Take the id list file into account when exporting records When exporting records (tools/export.pl or misc/export_records.pl), a file of ids (authid or biblionumber) can be passed to filter the results. Bug 14722 has broken this behavior. Test plan: Export records and specify a list of records to filter the results. Prior to this patch, the record with the id 1 was exported. Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 48445 [details] [review] Bug 15923: Fix --id_list_file option for misc/export_records.pl Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 48527 [details] [review] [PASSED QA] Bug 15923: Take the id list file into account when exporting records When exporting records (tools/export.pl or misc/export_records.pl), a file of ids (authid or biblionumber) can be passed to filter the results. Bug 14722 has broken this behavior. Test plan: Export records and specify a list of records to filter the results. Prior to this patch, the record with the id 1 was exported. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 48528 [details] [review] [PASSED QA] Bug 15923: Fix --id_list_file option for misc/export_records.pl Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to Master - Should be in the May 2016 release. Thanks!
Patch pushed to stable, will be in 3.22.5
Can't be backported to 3.20 due to bug 14722 not being backported to 3.20.