Bug 19096: Make Default authoritative in core modules
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 10 Aug 2017 08:59:07 +0000 (10:59 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 7 Dec 2017 17:44:15 +0000 (14:44 -0300)
commit590cae04fd4cb0fc6fa309d6006fd14f48ea4a03
tree10a61d887000f9d8047c30a81c9b0fc73db7a91d
parent2164fce41fe2835a909cc952a346ac3e145a5390
Bug 19096: Make Default authoritative in core modules

After feedback from the dev mailing list, it seems appropriate here to
propose making the Default framework authoritative for Koha to MARC
mappings. This implies checking only the Default framework in the
routines:

[1] GetMarcFromKohaField: The parameter frameworkcode is removed. A
    follow-up report (19097) will update the calls not adjusted here.
    This is safe since the parameter is silently ignored.
[2] GetMarcSubfieldStructureFromKohaField: Framework parameter is removed
    and calls are adjusted. Includes acquisitions_stats.pl.
[3] TransformKohaToMarc: The parameter is removed; all calls are verified
    or adjusted.
[4] TransformMarcToKoha: The parameter is no longer used and will be
    removed in a follow-up report (19097). It always goes to Default now.
[5] TransformMarcToKohaOneField: The parameter is removed and all calls
    are adjusted. Including: Breeding, XISBN and MetadataRecord modules.
[6] C4::Koha::IsKohaFieldLinked: This routine was called only once (in
    C4::Items::_build_default_values_for_mod_marc. It can be replaced by
    calling GetMarcFromKohaField. If there is no kohafield linked, undef
    is returned. (Corresponding unit test is removed here.)
[7] C4::Items::ModItemFromMarc: The helper routine
    _build_default_values_for_mod_marc does no longer have a framework
    parameter. The cache key default_value_for_mod_marc- is no longer
    combined with a frameworkcode. Three admin scripts are adjusted
    accordingly; some tests will be corrected in the next patch.

Test plan:
See next patch. That patch adjusts all tests involved.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Biblio.pm
C4/Breeding.pm
C4/Items.pm
C4/Koha.pm
C4/XISBN.pm
Koha/MetadataRecord.pm
admin/biblio_framework.pl
admin/marc_subfields_structure.pl
admin/marctagstructure.pl
reports/acquisitions_stats.pl
t/db_dependent/Koha/IsKohaFieldLinked.t [deleted file]