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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 19 May 2021 13:06:42 +0000 (15:06 +0200)
commitdb382ebaffd393151e0ebd8e6579f5c11969a90c
treef9e524d7d9ec425117ca20f87f288a6935f73eb1
parentaa1d86920bd0392b4894fa2e756dcb41f2f7a5ec
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>
C4/Items.pm
t/db_dependent/Items.t