Bugzilla – Attachment 98760 Details for
Bug 24469
Record biblionumber in import_biblio when adding to basket via file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24469: Record biblionumber in import_biblio when adding to basket via file
Bug-24469-Record-biblionumber-in-importbiblio-when.patch (text/plain), 2.19 KB, created by
Jonathan Druart
on 2020-02-12 15:31:02 UTC
(
hide
)
Description:
Bug 24469: Record biblionumber in import_biblio when adding to basket via file
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-12 15:31:02 UTC
Size:
2.19 KB
patch
obsolete
>From 181b861902a3b043554726ff09a47b5ed5acf990 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 12 Feb 2020 16:22:02 +0100 >Subject: [PATCH] Bug 24469: Record biblionumber in import_biblio when adding > to basket via file > >The column import_biblios.matched_biblionumber was not populated when an >order is created from a staged file. > >Test plan: >A/ Create a new order from a stage file. >Use the "Save" button at the bottom of the "Add orders from" page >Then note the matched_biblionumber value. It should be populated correctly > >B/ Import again the same record, this time you will have to use the "Add >order" link in the list of order (ie. not the "Save" button) >Note the matched_biblionumber value. It should be populated correctly >--- > acqui/addorderiso2709.pl | 6 ++++++ > acqui/neworderempty.pl | 5 +++++ > 2 files changed, 11 insertions(+) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 224f38a0ab..b1dfc20a9a 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -199,6 +199,12 @@ if ($op eq ""){ > SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); > } > >+ my $dbh = C4::Context->dbh; >+ $dbh->do( >+ q|UPDATE import_biblios SET matched_biblionumber = ? WHERE import_record_id = ?|, >+ undef, $biblio->{biblionumber}, $biblio->{import_record_id} >+ ); >+ > # Add items from MarcItemFieldsToOrder > my @homebranches = $input->multi_param('homebranch_' . $biblio_count); > my $count = scalar @homebranches; >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index f41e598861..0d8f6d807e 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -169,6 +169,11 @@ if ( $ordernumber eq '' and defined $params->{'breedingid'}){ > # get the price if there is one. > $listprice = GetMarcPrice($marcrecord, $marcflavour); > SetImportRecordStatus($params->{'breedingid'}, 'imported'); >+ my $dbh = C4::Context->dbh; >+ $dbh->do( >+ q|UPDATE import_biblios SET matched_biblionumber = ? WHERE import_record_id = ?|, >+ undef, $biblionumber, $params->{breedingid} >+ ); > } > > >-- >2.11.0
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 24469
:
98760
|
99073
|
102805
|
116255
|
116779
|
116792
|
116813
|
116975
|
116976