Bugzilla – Attachment 179283 Details for
Bug 39282
When adding an order from file, data entered in the "Item information" tab is not saved and invalid items are created
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39282: Use generated MARC record to create item and return itemnumber
Bug-39282-Use-generated-MARC-record-to-create-item.patch (text/plain), 1.39 KB, created by
Andrew Fuerste-Henry
on 2025-03-13 18:10:16 UTC
(
hide
)
Description:
Bug 39282: Use generated MARC record to create item and return itemnumber
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2025-03-13 18:10:16 UTC
Size:
1.39 KB
patch
obsolete
>From 48addb1bf4782e145bf234cb5500c3266b0654d4 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 12 Mar 2025 17:06:59 +0000 >Subject: [PATCH] Bug 39282: Use generated MARC record to create item and > return itemnumber > >When creating items from the form we need to use the MARC record we build from the HTML->XML->MARC > >This patch simply uses the variable we create and ensures we pass the itemnumbers back > >To test: >1 - prove -v t/db_dependent/Koha/MarcOrders.t >2 - Still failing >3 - Apply this patch >4 - Success! > >Phew! We did it. > >Signed-off-by: John Vinke <jvinke@austinseminary.edu> >--- > Koha/MarcOrder.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/Koha/MarcOrder.pm b/Koha/MarcOrder.pm >index 583ad9fffa..fa8cc831fe 100644 >--- a/Koha/MarcOrder.pm >+++ b/Koha/MarcOrder.pm >@@ -1117,8 +1117,9 @@ sub create_items_and_generate_order_hash { > my $record = MARC::Record::new_from_xml( $xml, 'UTF-8' ); > for ( my $qtyloop = 1 ; $qtyloop <= $fields->{c_quantity} ; $qtyloop++ ) { > my ( $biblionumber, undef, $itemnumber ) = >- AddItemFromMarc( $fields->{marcrecord}, $fields->{biblionumber} ); >+ AddItemFromMarc( $record, $fields->{biblionumber} ); > $order->add_item($itemnumber); >+ push @itemnumbers, $itemnumber; > } > } > } >-- >2.39.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 39282
:
179222
|
179223
|
179224
|
179225
|
179230
|
179280
|
179281
|
179282
|
179283
|
179305
|
179306
|
179307
|
179308
|
179345