We should test the item-level_itypes, biblioitems.itemtype, items.itype and the itemtypes table.
could we make the test on biblioitems.itemtype optional? We never set it (union catalog, can't save fields from being overwritten etc.)
The idea is: 1. if item-level_itypes, then items.itype must be set else biblioitems.itemtype must be set 2. item types defined in items and (or?) biblioitems must be defined in the itemtypes table Does it make sense?
Yes, it does!
Created attachment 77481 [details] [review] Bug 21150: Search for item types inconsistencies search_for_data_inconsistencies.pl will now display errors if: 1.item-level_itypes is set to "specific item" and items.itype is not set or not set to an item type defined in the system (itemtypes.itemtype) 2.item-level_itypes is set to "biblio record" and biblioitems.itemtype is not set or not set to an item type defined in the system (itemtypes.itemtype) Test plan: Use the script and the different possible combinations to display the errors
Created attachment 77523 [details] [review] Bug 21150: Search for item types inconsistencies search_for_data_inconsistencies.pl will now display errors if: 1.item-level_itypes is set to "specific item" and items.itype is not set or not set to an item type defined in the system (itemtypes.itemtype) 2.item-level_itypes is set to "biblio record" and biblioitems.itemtype is not set or not set to an item type defined in the system (itemtypes.itemtype) Test plan: Use the script and the different possible combinations to display the errors Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This works well for me. Can I suggest an improvement? It would make it a lot easier to follow up on errors if the biblionumber was in the output too.
Created attachment 77534 [details] [review] Bug 21150: add the biblionumber to the output
(In reply to Owen Leonard from comment #6) > This works well for me. Can I suggest an improvement? It would make it a lot > easier to follow up on errors if the biblionumber was in the output too. Like what does this last patch?
Created attachment 77537 [details] [review] Bug 21150: add the biblionumber to the output Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 77562 [details] [review] Bug 21150: Search for item types inconsistencies search_for_data_inconsistencies.pl will now display errors if: 1.item-level_itypes is set to "specific item" and items.itype is not set or not set to an item type defined in the system (itemtypes.itemtype) 2.item-level_itypes is set to "biblio record" and biblioitems.itemtype is not set or not set to an item type defined in the system (itemtypes.itemtype) Test plan: Use the script and the different possible combinations to display the errors Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 77563 [details] [review] Bug 21150: add the biblionumber to the output Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Awesome work all! Pushed to master for 18.11
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.
Pushed to 17.11.x for 17.11.10