Bug 27837: Update permanent location if passed into ModItemFromMarc
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (cherry picked from commit97647da9a0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commited682c0f0a) Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
parent
d1e1b00b95
commit
1803a3fc17
|
|
@ -308,6 +308,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(
|
||||
{
|
||||
|
|
@ -330,6 +332,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} });
|
||||
|
|
|
|||
Loading…
Reference in New Issue