Summary: | Errors in search_for_data_inconsistencies.pl relating to authorised values and frameworks | ||
---|---|---|---|
Product: | Koha | Reporter: | Andrew Fuerste-Henry <andrew> |
Component: | Command-line Utilities | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, kyle, m.de.rooy, nick, robin, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.11.00,21.05.05,20.11.11
|
|
Circulation function: | |||
Bug Depends on: | 21466, 27852 | ||
Bug Blocks: | |||
Attachments: |
Bug 28352: Only check authorised values mapped to DB fields
Bug 28352: Only check authorised values mapped to DB fields Bug 28352: Only check authorised values mapped to DB fields |
Description
Andrew Fuerste-Henry
2021-05-13 19:40:09 UTC
Created attachment 121424 [details] [review] 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 Created attachment 123447 [details] [review] 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> I was just about to open the same issue ;) Thanks a lot Nick :D My fix was 143 next unless $kohafield and $av; But yours is better. Created attachment 125599 [details] [review] 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> Pushed to master for 21.11, thanks to everybody involved! Pushed to 21.05.x for 21.05.05 Pushed to 20.11.x for 20.11.11 Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. |