Bugzilla – Attachment 48444 Details for
Bug 15923
Export records by id list impossible in export_records.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15923: Take the id list file into account when exporting records
Bug-15923-Take-the-id-list-file-into-account-when-.patch (text/plain), 2.04 KB, created by
Josef Moravec
on 2016-02-29 11:36:02 UTC
(
hide
)
Description:
Bug 15923: Take the id list file into account when exporting records
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2016-02-29 11:36:02 UTC
Size:
2.04 KB
patch
obsolete
>From ec1efaa2c676774a43ae82b118a68739f0444c86 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 29 Feb 2016 08:10:59 +0000 >Subject: [PATCH] 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> >--- > misc/export_records.pl | 2 +- > tools/export.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/misc/export_records.pl b/misc/export_records.pl >index e6c3d98..b411425 100755 >--- a/misc/export_records.pl >+++ b/misc/export_records.pl >@@ -175,7 +175,7 @@ elsif ( $record_type eq 'auths' ) { > @record_ids = uniq @record_ids; > if ( @record_ids and my $id_list_file ) { > my @filter_record_ids = <$id_list_file>; >- @filter_record_ids = map { my $id = $_; $id =~ s/[\r\n]*$// } @filter_record_ids; >+ @filter_record_ids = map { my $id = $_; $id =~ s/[\r\n]*$//; $id } @filter_record_ids; > # intersection > my %record_ids = map { $_ => 1 } @record_ids; > @record_ids = grep $record_ids{$_}, @filter_record_ids; >diff --git a/tools/export.pl b/tools/export.pl >index 2e8b044..efcd544 100755 >--- a/tools/export.pl >+++ b/tools/export.pl >@@ -178,7 +178,7 @@ if ( $op eq "export" ) { > @record_ids = uniq @record_ids; > if ( @record_ids and my $filefh = $query->upload("id_list_file") ) { > my @filter_record_ids = <$filefh>; >- @filter_record_ids = map { my $id = $_; $id =~ s/[\r\n]*$// } @filter_record_ids; >+ @filter_record_ids = map { my $id = $_; $id =~ s/[\r\n]*$//; $id } @filter_record_ids; > # intersection > my %record_ids = map { $_ => 1 } @record_ids; > @record_ids = grep $record_ids{$_}, @filter_record_ids; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15923
:
48429
|
48430
|
48439
|
48444
|
48445
|
48527
|
48528