Bugzilla – Attachment 57469 Details for
Bug 17622
Export tool only exports biblios with items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17622: Export biblios without items
Bug-17622-Export-biblios-without-items.patch (text/plain), 2.37 KB, created by
Jonathan Druart
on 2016-11-14 12:45:36 UTC
(
hide
)
Description:
Bug 17622: Export biblios without items
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-11-14 12:45:36 UTC
Size:
2.37 KB
patch
obsolete
>From cbc652bb880ce6eb3ded7273d31e2b61a3278dd0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 14 Nov 2016 12:41:56 +0000 >Subject: [PATCH] Bug 17622: Export biblios without items > >In some situations, we need to export bibliographic records without >items. > >Test plan: >Confirm that you get bibliographic records without items when you expect >to get record without items. >Basically it should happen when you do not specify filters on items >--- > misc/export_records.pl | 10 +++++++++- > tools/export.pl | 11 ++++++++++- > 2 files changed, 19 insertions(+), 2 deletions(-) > >diff --git a/misc/export_records.pl b/misc/export_records.pl >index 34b4da3..950db06 100755 >--- a/misc/export_records.pl >+++ b/misc/export_records.pl >@@ -149,7 +149,15 @@ if ( $record_type eq 'bibs' ) { > ), > > }; >- my $biblioitems = Koha::Biblioitems->search( $conditions, { join => 'items' } ); >+ >+ my $join_on_items = >+ $starting_callnumber >+ || $ending_callnumber >+ || $start_accession >+ || $end_accession >+ || ( $itemtype && C4::Context->preference('item-level_itypes') ); >+ >+ my $biblioitems = Koha::Biblioitems->search( $conditions, { ( $join_on_items ? ( join => 'items' ) : () ), columns => 'biblionumber' } ); > while ( my $biblioitem = $biblioitems->next ) { > push @record_ids, $biblioitem->biblionumber; > } >diff --git a/tools/export.pl b/tools/export.pl >index c585d90..9acbc65 100755 >--- a/tools/export.pl >+++ b/tools/export.pl >@@ -144,7 +144,16 @@ if ( $op eq "export" ) { > ), > > }; >- my $biblioitems = Koha::Biblioitems->search( $conditions, { join => 'items', columns => 'biblionumber' } ); >+ >+ my $join_on_items = >+ @branchcodes >+ || $start_callnumber >+ || $end_callnumber >+ || $start_accession >+ || $end_accession >+ || ( $itemtype && C4::Context->preference('item-level_itypes') ); >+ >+ my $biblioitems = Koha::Biblioitems->search( $conditions, { ( $join_on_items ? ( join => 'items' ) : () ), columns => 'biblionumber' } ); > while ( my $biblioitem = $biblioitems->next ) { > push @record_ids, $biblioitem->biblionumber; > } >-- >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 17622
: 57469