Bugzilla – Attachment 156211 Details for
Bug 34645
Add missing fields to MarcItemFieldsToOrder system preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34645: always use discount, sort1, and sort2 from MarcFieldsToOrder
Bug-34645-always-use-discount-sort1-and-sort2-from.patch (text/plain), 2.63 KB, created by
Jonathan Druart
on 2023-09-26 10:26:32 UTC
(
hide
)
Description:
Bug 34645: always use discount, sort1, and sort2 from MarcFieldsToOrder
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-09-26 10:26:32 UTC
Size:
2.63 KB
patch
obsolete
>From d65c5b7aa197ceab99bff95e4e7210318048720a Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 18 Sep 2023 16:32:10 +0000 >Subject: [PATCH] Bug 34645: always use discount, sort1, and sort2 from > MarcFieldsToOrder > >These values are stored at the order level, not per item. This patch simply sets the order values from the values retrieved from MarcFieldsToOrder even inf MarcItemFields to order is being used for other fields > >To test: >Setup -- Set systempreferences below > >MarcFieldsToOrder: >price: 949$g >quantity: 949$k >budget_code: 949$l >discount: 949$m >sort1: 949$n >sort2: 949$q > >MarcItemFieldsToOrder: >homebranch: 949$a >holdingbranch: 949$b >itype: 949$y >nonpublic_note: 949$x >public_note: 949$z >loc: 949$c >ccode: 949$8 >notforloan: 949$7 >uri: 949$u >copyno: 949$t >price: 949$g >replacementprice: 949$v >itemcallnumber: 949$o >quantity: 949$k >budget_code: 949$l > >Stage the attached bib-303.marcxml file >Add to basket from the staged file >Note that discount and sort1 and sort2 are not populated per the Marc >Apply patch, restart all >Stage and add to basket again >Confirm discount and sort1 and sort2 are populated correctly > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > acqui/addorderiso2709.pl | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 250d9c2bb39..d1093518e0d 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -576,17 +576,20 @@ sub import_biblios_list { > } > push @list, \%cellrecord; > >+ # If MarcItemFieldsToOrder is not set, we use MarcFieldsToOrder to populate the order form. > if ($alliteminfos == -1 || scalar(@$alliteminfos) == 0) { > $cellrecord{price} = $price || ''; > $cellrecord{replacementprice} = $replacementprice || ''; > $cellrecord{quantity} = $quantity || ''; > $cellrecord{budget_id} = $budget_id || ''; >- $cellrecord{discount} = $discount || ''; >- $cellrecord{sort1} = $sort1 || ''; >- $cellrecord{sort2} = $sort2 || ''; > } else { >+ # When using MarcItemFields to order we want the order to have the same quantity as total items > $cellrecord{quantity} = $all_items_quantity; > } >+ # The fields discount, sort1, and sort2 only exist at the order level, so always use MarcItemFieldsToOrder >+ $cellrecord{discount} = $discount || ''; >+ $cellrecord{sort1} = $sort1 || ''; >+ $cellrecord{sort2} = $sort2 || ''; > > } > my $num_records = $batch->{'num_records'}; >-- >2.25.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 34645
:
154912
|
155338
|
155564
|
155852
|
156156
|
156194
|
156195
| 156211 |
156212