Summary: | 500 Error: Something went wrong when loading the table Should Exit Cleanly | ||
---|---|---|---|
Product: | Koha | Reporter: | John Yorio <jyorio> |
Component: | Cataloging | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | In Discussion --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, lisette, lucas, m.de.rooy, marion.durand, nick |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 40777: Introduce Koha::Database::DataInconsistency
Bug 40777: Add 'Audit' button in the toolbar Bug 40777: Add info in the alert |
Description
John Yorio
2025-09-09 15:53:59 UTC
Created attachment 187526 [details] [review] Bug 40777: Introduce Koha::Database::DataInconsistency Created attachment 187527 [details] [review] Bug 40777: Add 'Audit' button in the toolbar Created attachment 187528 [details] [review] Bug 40777: Add info in the alert Patches for discussion and feedback. I am suggesting to move the code from the search_for_inconsistencies.pl maintenance script to a module to make it reusable from the Koha UI. Those patch moves only the first check (no valid home or holding library) to the module, and add an "Audit" icon to the bibliographic toolbar. https://snipboard.io/1owIgH.jpg If people are willing to test and provide feedback, I will provide more work. From kohastructure `homebranch` varchar(10) DEFAULT NULL COMMENT 'foreign key from the branches table for the library that owns this item (MARC21 952$a)', `holdingbranch` varchar(10) DEFAULT NULL COMMENT 'foreign key from the branches table for the library that is currently in possession item (MARC21 952$b)', While both columns may still be NULL, we will have such issues. What about NOT NULL to ensure integrity? If we create an item somewhere or import it, we should probably know where it belongs. Just suspecting that invalid branchcodes during import may be at stake. And note that the REST API who is called to fetch the items, may need some extra check while we dont address it in the table design? (In reply to Marcel de Rooy from comment #5) > From kohastructure > `homebranch` varchar(10) DEFAULT NULL COMMENT 'foreign key from the > branches table for the library that owns this item (MARC21 952$a)', > `holdingbranch` varchar(10) DEFAULT NULL COMMENT 'foreign key from the > branches table for the library that is currently in possession item (MARC21 > 952$b)', > > While both columns may still be NULL, we will have such issues. > What about NOT NULL to ensure integrity? > If we create an item somewhere or import it, we should probably know where > it belongs. Just suspecting that invalid branchcodes during import may be at > stake. > > And note that the REST API who is called to fetch the items, may need some > extra check while we dont address it in the table design? This is outside the scope. I have implemented the first test of misc/maintenance/search_for_data_inconsistencies.pl, but there are more: * incorrect item type (yes you could argue that a FK is missing as well for this one) * invalid marcxml * item fields in MARC * wrong authorised values * record without title The goal here is to offer the output of the script from the UI. |