Bugzilla – Attachment 166555 Details for
Bug 35927
Selecting MARC framework again doesn't work when adding to basket from an external source
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35927: Selecting MARC framework again doesn't work when adding to basket from an external source
Bug-35927-Selecting-MARC-framework-again-doesnt-wo.patch (text/plain), 3.67 KB, created by
Nick Clemens (kidclamp)
on 2024-05-10 13:14:48 UTC
(
hide
)
Description:
Bug 35927: Selecting MARC framework again doesn't work when adding to basket from an external source
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-05-10 13:14:48 UTC
Size:
3.67 KB
patch
obsolete
>From e3a49a73f17180574aa6727ac99a500a021be1d2 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Mon, 29 Jan 2024 10:08:00 +0100 >Subject: [PATCH] Bug 35927: Selecting MARC framework again doesn't work when > adding to basket from an external source > >Like Bug 19372, selecting MARC framework currently doesn't work when adding to basket from an external source. >Strangly I can reproduce on koha-testing-docker, but we have this issue with a Ubuntu Focal install. >Looks like it comes from a bad syntaxe than needs to be replaced in any case. > >Test plan: >1) Add an order to a basket from an external source >2) Select another framework than the default one on the search result > view. Before doing 'add order' on choosen search result line. >3) Chek the framework code you will pick will be used in the created biblio record > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > acqui/neworderempty.pl | 17 ++++++++--------- > 1 file changed, 8 insertions(+), 9 deletions(-) > >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 1ec08269f6a..ae279464bc7 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -115,6 +115,8 @@ my $suggestionid = $input->param('suggestionid'); > my $uncertainprice = $input->param('uncertainprice'); > my $import_batch_id = $input->param('import_batch_id'); # if this is filled, we come from a staged file, and we will return here after saving the order ! > my $from_subscriptionid = $input->param('from_subscriptionid'); >+my $frameworkcode = $input->param('frameworkcode') // q{}; >+our $breedingid = $input->param('breedingid'); > my $data; > my $new = 'no'; > my $op = $input->param('op') || q{}; >@@ -158,12 +160,10 @@ my $contract = GetContract({ > contractnumber => $basket->{contractnumber} > }); > >-#simple parameters reading (all in one :-) >-our $params = $input->Vars; > my $listprice=0; # the price, that can be in MARC record if we have one >-if ( $ordernumber eq '' and defined $params->{'breedingid'}){ >+if ( $ordernumber eq '' and defined $breedingid ){ > #we want to import from the breeding reservoir (from a z3950 search) >- my ($marcrecord, $encoding) = MARCfindbreeding($params->{'breedingid'}); >+ my ($marcrecord, $encoding) = MARCfindbreeding($breedingid); > die("Could not find the selected record in the reservoir, bailing") unless $marcrecord; > > # Remove all the items (952) from the imported record >@@ -183,13 +183,12 @@ if ( $ordernumber eq '' and defined $params->{'breedingid'}){ > #from this point: add a new record > C4::Acquisition::FillWithDefaultValues($marcrecord, {only_mandatory => 1}); > my $bibitemnum; >- $params->{'frameworkcode'} or $params->{'frameworkcode'} = ""; >- ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $params->{'frameworkcode'} ); >+ ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $frameworkcode ); > # get the price if there is one. > $listprice = GetMarcPrice($marcrecord, $marcflavour); >- SetImportRecordStatus($params->{'breedingid'}, 'imported'); >+ SetImportRecordStatus( $breedingid, 'imported' ); > >- SetMatchedBiblionumber( $params->{breedingid}, $biblionumber ); >+ SetMatchedBiblionumber( $breedingid, $biblionumber ); > } > > >@@ -625,7 +624,7 @@ sub Load_Duplicate { > biblionumber => $biblionumber, > basketno => $basketno, > booksellerid => $basket->{'booksellerid'}, >- breedingid => $params->{'breedingid'}, >+ breedingid => $breedingid, > duplicatetitle => $duplicatetitle, > (uc(C4::Context->preference("marcflavour"))) => 1 > ); >-- >2.39.2
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 35927
:
161576
|
162487
| 166555