Bugzilla – Attachment 33377 Details for
Bug 13182
When placing an order from a staged file, check for duplicates, display availability information, choose to overlay matched records.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13182 - Overlay an existing Biblio with the acquired import_record
Bug-13182---Overlay-an-existing-Biblio-with-the-ac.patch (text/plain), 3.93 KB, created by
Olli-Antti Kivilahti
on 2014-11-07 14:51:58 UTC
(
hide
)
Description:
Bug 13182 - Overlay an existing Biblio with the acquired import_record
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2014-11-07 14:51:58 UTC
Size:
3.93 KB
patch
obsolete
>From 942402bcdb29aa997e03b2a98366417a2337e2cd Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Fri, 7 Nov 2014 14:31:02 +0200 >Subject: [PATCH] Bug 13182 - Overlay an existing Biblio with the acquired > import_record > >If we know we already have a matching biblio in Koha, we can optionally overlay the existing Biblio with the >new one. (We don't really need it but looks like Bg_12074 needs it). Also a good hook to attach more advanced >automatic overlaying/transformation mechanisms. >--- > acqui/addorderiso2709.pl | 9 ++++++--- > .../prog/en/modules/acqui/addorderiso2709.tt | 1 + > 2 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 037009e..c6be891 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -159,6 +159,7 @@ if ($op eq ""){ > my $import_batch_id = $cgiparams->{'import_batch_id'}; > my $biblios = GetImportRecordsRange($import_batch_id); > my @import_record_id_selected = $input->param("import_record_id"); >+ my @overlay = $input->param("overlay"); > my @quantities = $input->param('quantity'); > my @prices = $input->param('price'); > my @budgets_id = $input->param('budget_id'); >@@ -173,6 +174,7 @@ if ($op eq ""){ > my $marcrecord = MARC::Record->new_from_usmarc($marcblob) || die "couldn't translate marc information"; > my $match = GetImportRecordMatches( $biblio->{'import_record_id'}, 1 ); > my $biblionumber=$#$match > -1?$match->[0]->{'biblionumber'}:0; >+ my $c_overlay = shift @overlay; > my $c_quantity = shift( @quantities ) || GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour') ) || 1; > my $c_budget_id = shift( @budgets_id ) || $input->param('all_budget_id') || $budget_id; > my $c_discount = shift ( @discount); >@@ -180,8 +182,8 @@ if ($op eq ""){ > my $c_sort1 = shift( @sort1 ) || $input->param('all_sort1') || ''; > my $c_sort2 = shift( @sort2 ) || $input->param('all_sort2') || ''; > >- # 1st insert the biblio, or find it through matcher >- unless ( $biblionumber ) { >+ # INSERT the biblio if no match found, or if we want to overlay the existing match >+ if ( not($biblionumber) || $c_overlay ) { > # add the biblio > my $bibitemnum; > >@@ -196,7 +198,8 @@ if ($op eq ""){ > } > } > } >- ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' ); >+ ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' ) unless $c_overlay; >+ ModBiblio( $marcrecord, $biblionumber, $cgiparams->{'frameworkcode'} || '' ) if $c_overlay; > SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); > > #We need to provide information to koha.import_record_matches to tell Koha that this import_record matches the >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index 6464baf..7dca7bb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -213,6 +213,7 @@ > [% END %] > [% IF ( biblio.match_biblionumber ) %] > Matches biblio [% biblio.match_biblionumber %] (score = [% biblio.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber %]">[% biblio.match_citation %]</a> >+ Overlay? <input type="checkbox" name="overlay" id="overlay_record_[% biblio.import_record_id %]" value="[% biblio.import_record_id %]" /> > [% END %] > </span> > </li> >-- >1.7.9.5
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 13182
:
33085
|
33087
|
33088
|
33090
|
33376
|
33377
|
33378
|
33379
|
38113
|
38114
|
38115