Bug 20509

Summary: Data consistency - authority types
Product: Koha Reporter: Jonathan Druart <jonathan.druart+koha>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart+koha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, katrin.fischer, martin.renvoize, nick
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5789
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 20385, 21011    
Bug Blocks: 21010, 21150    
Attachments: Bug 20509: Search for not defined authority codes
Bug 20509: Search for not defined authority codes
Bug 20509: Search for not defined authority codes
Bug 20509: Add to script documentation

Description Jonathan Druart 2018-04-02 19:42:39 UTC
From bug 20385.

We should display a message on the about page (or a new page dedicated to data consistency) if an authtypecode of authority records does not correspond to an authority type defined in the system.
Comment 1 Jonathan Druart 2018-06-27 18:38:55 UTC
Created attachment 76534 [details] [review]
Bug 20509: Search for not defined authority codes

This patch adds a new check in
misc/maintenance/search_for_data_inconsistencies.pl to search for not
defined authority codes.

Test plan:
Set some auth_header.authtypecode to not defined authority codes in Koha
(UPDATE auth_header SET authtypecode="XXX" WHERE authid=42;)
Then run `misc/maintenance/search_for_data_inconsistencies.pl`
Comment 2 Jonathan Druart 2018-06-27 18:39:33 UTC
Need patch from bug 21011 to apply correctly.
Comment 3 Josef Moravec 2018-06-27 20:32:55 UTC
Created attachment 76538 [details] [review]
Bug 20509: Search for not defined authority codes

This patch adds a new check in
misc/maintenance/search_for_data_inconsistencies.pl to search for not
defined authority codes.

Test plan:
Set some auth_header.authtypecode to not defined authority codes in Koha
(UPDATE auth_header SET authtypecode="XXX" WHERE authid=42;)
Then run `misc/maintenance/search_for_data_inconsistencies.pl`

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Katrin Fischer 2018-08-01 16:24:04 UTC
Created attachment 77386 [details] [review]
Bug 20509: Search for not defined authority codes

This patch adds a new check in
misc/maintenance/search_for_data_inconsistencies.pl to search for not
defined authority codes.

Test plan:
Set some auth_header.authtypecode to not defined authority codes in Koha
(UPDATE auth_header SET authtypecode="XXX" WHERE authid=42;)
Then run `misc/maintenance/search_for_data_inconsistencies.pl`

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2018-08-01 16:24:08 UTC
Created attachment 77387 [details] [review]
Bug 20509: Add to script documentation

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Nick Clemens 2018-08-22 15:01:17 UTC
Awesome work all!

Pushed to master for 18.11
Comment 7 Martin Renvoize 2018-08-24 11:55:15 UTC
Enhancement pushed to 18.05.x for 18.05.03. 

As with bug 21011 this is a helpful enhancement for system administrators and has no negative (or visible effects) for the end users. Backported.
Comment 8 Fridolin Somers 2018-09-21 13:52:06 UTC
Pushed to 17.11.x for 17.11.10