]> git.koha-community.org Git - koha.git/commit
Bug 28352: Only check authorised values mapped to DB fields
authorNick Clemens <nick@bywatersolutions.com>
Wed, 26 May 2021 11:42:02 +0000 (11:42 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 21 Oct 2021 04:07:15 +0000 (18:07 -1000)
commit294d43597afee4687dc568a0f1f598babc855825
tree8b3f083674489a35b13fb7f789427b1b571fbe20
parentdbf315fc3dc652c29587501788905df630feb984
Bug 28352: Only check authorised values mapped to DB fields

The errors reported seem to be caused by authorised values mapped to MARC fields
but not mapped to a koha field.

We should additionally make sure to check the Default framework

Also, adding comment to indicate we only check records with items, because we do

TO test:
1 - In a framework that is not the default map a MARC field to an authorised value, but not a koha field
2 - In SQL, force the kohafield to NULL for the mapping you just make
    UPDATE marc_subfield_structure SET kohafield = NULL WHERE frameworkcode='BKS' and authorised_value='HINGS_AS'
3 - perl misc/maintenance/search_for_data_inconsistencies.pl
4 - get the following errors:
Use of uninitialized value $tmp_kohafield in pattern match (m//) at /kohadevbox/koha/misc/maintenance/search_for_data_inconsistencies.pl line 151.
Use of uninitialized value $tmp_kohafield in substitution (s///) at /kohadevbox/koha/misc/maintenance/search_for_data_inconsistencies.pl line 154.
Can't call method "get_column" on an undefined value at /kohadevbox/koha/misc/maintenance/search_for_data_inconsistencies.pl line 157.
5 - Apply patch
6 - Repeat
7 - No more errors

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 392f673caea98dbafddf562dc76dea5f0ebeda44)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
misc/maintenance/search_for_data_inconsistencies.pl