Bugzilla – Attachment 117570 Details for
Bug 27837
Permanent location is reverted to location when location updated and permanent_location mapped to MARC field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27837: Update permanent location if passed into ModItemFromMarc
Bug-27837-Update-permanent-location-if-passed-into.patch (text/plain), 1.33 KB, created by
Kyle M Hall (khall)
on 2021-03-03 13:34:22 UTC
(
hide
)
Description:
Bug 27837: Update permanent location if passed into ModItemFromMarc
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-03-03 13:34:22 UTC
Size:
1.33 KB
patch
obsolete
>From ad8a6dec86f4ba9a60631adb8f1d39b125b8fa76 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 3 Mar 2021 08:33:21 -0500 >Subject: [PATCH] Bug 27837: Update permanent location if passed into > ModItemFromMarc > >--- > C4/Items.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 861b845045..b985103612 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -306,6 +306,8 @@ sub ModItemFromMarc { > my $item_object = Koha::Items->find($itemnumber); > my $item = TransformMarcToKoha( $localitemmarc, $frameworkcode, 'items' ); > >+ my $has_permanent_location = $item->{permanent_location}; >+ > # Retrieving the values for the fields that are not linked > my @mapped_fields = Koha::MarcSubfieldStructures->search( > { >@@ -328,6 +330,8 @@ sub ModItemFromMarc { > $item_object = $item_object->set_or_blank($item); > $item_object->cn_sort($existing_cn_sort); # Resetting to the existing value > >+ $item_object->make_column_dirty('permanent_location') if $has_permanent_location; >+ > my $unlinked_item_subfields = _get_unlinked_item_subfields( $localitemmarc, $frameworkcode ); > $item_object->more_subfields_xml(_get_unlinked_subfields_xml($unlinked_item_subfields)); > $item_object->store({ skip_record_index => $params->{skip_record_index} }); >-- >2.24.1 (Apple Git-126)
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 27837
:
117570
|
117572
|
117625
|
117626
|
117627
|
117628
|
117634
|
117728
|
117729
|
117730
|
117735
|
117738
|
120361
|
120362
|
120363
|
120364
|
120562
|
120563
|
120564
|
120565
|
120566
|
120616
|
120628
|
120629
|
120832
|
121044
|
121045
|
121046
|
121047
|
121048
|
121049
|
121050
|
121051
|
121052