]> git.koha-community.org Git - koha.git/commit
Bug 27837: Check the MARC directly, not the transformed item
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 6 May 2021 12:09:04 +0000 (08:09 -0400)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Tue, 25 May 2021 14:09:38 +0000 (14:09 +0000)
commit60c61af04c00a42c56bc26cdb0859b08bbabf6cb
treea46b547bf148664e4711ebbfa86ced3b3bb0d426
parentdc2eccbeac03f9a15eaa60f35a9d2362fad1953f
Bug 27837: Check the MARC directly, not the transformed item

If permanent location is mapped, it will exist in the MARC.
However, when we are transforming our item hash to MARC,
we are losing our permanent location mapping, at least in unit tests.

By checking the original MARC for the permenent location, we remove the
risk of losing it the "empty" permenent location through the
transformation process. We only need to know that it existed in the
original item marc to know we need to update it in the database.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit db382ebaffd393151e0ebd8e6579f5c11969a90c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4aaf0b3077ceae65b7da976f9cf47ad273051835)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
C4/Items.pm
t/db_dependent/Items.t