Bugzilla – Attachment 38114 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), 4.31 KB, created by
Mark Tompsett
on 2015-04-18 03:56:36 UTC
(
hide
)
Description:
Bug 13182 - Overlay an existing Biblio with the acquired import_record
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-04-18 03:56:36 UTC
Size:
4.31 KB
patch
obsolete
>From dafdb9b607dc57c165f5a34cc8083913926351b4 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). > >TEST PLAN > >1. Add Items to an order from a staged file. >2. Go and edit the newly added Biblio. Set the field 003 to "TEST ME GENTLY". >3. Add more Items for this same biblio from the same staged_file. >4. While selecting what to add, check the "Overlay?"-checkbox to replace the existing Bibliographic record > with the import_record you are ordering. >5. Save the orderline selection. >6. Observe that the existing modified biblio has changed to it's latest revision. >--- > acqui/addorderiso2709.pl | 9 ++++++--- > koha-tmpl/intranet-tmpl/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 35884c6..efe30e8 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -158,6 +158,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'); >@@ -172,6 +173,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); >@@ -179,8 +181,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; > >@@ -195,7 +197,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 cf03b7c..e0a4b42 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -210,6 +210,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.9.1
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