Bug 13074: Use Koha::Cache to cache the defaults values of a MARC record
commita50e5f141b14c1ba6f9c491a40db1270a8c7be99
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 3 May 2016 10:08:47 +0000 (3 11:08 +0100)
committerFrédéric Demians <f.demians@tamil.fr>
Fri, 24 Jun 2016 05:23:12 +0000 (24 07:23 +0200)
treeb1133e7b1c95b11ccd778bfba439c0371b1fa01d
parent9710f07575ea7a56000058a687b1a9e835396b86
Bug 13074: Use Koha::Cache to cache the defaults values of a MARC record

With the global %default_values_for_mod_from_marc variable, the changes
made to the marc_subfield_structure table and especially the links
between MARC and DB fields are not safe and might be outdated (if a
field is linked/unlinked)

Test plan:
Under Plack:
- Link the barcode field, edit a record and set a barcode.
- Remove the mapping for the barcode field and then update again the
  barcode of the record.
The items.barcode DB field must not have been updated.

Without this patch, the field should have been updated.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8c14c25521eac92a2cb62ab5330deac2e2d5343d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
C4/Items.pm
admin/biblio_framework.pl
admin/marc_subfields_structure.pl
admin/marctagstructure.pl
t/db_dependent/Items.t