Bug 21150 - Data inconsistencies - item types
Summary: Data inconsistencies - item types
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 20509
Blocks: 21010
  Show dependency treegraph
 
Reported: 2018-08-02 15:24 UTC by Jonathan Druart
Modified: 2018-09-21 13:54 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 21150: Search for item types inconsistencies (4.70 KB, patch)
2018-08-03 18:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21150: Search for item types inconsistencies (4.75 KB, patch)
2018-08-07 13:41 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 21150: add the biblionumber to the output (1.33 KB, patch)
2018-08-07 14:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21150: add the biblionumber to the output (1.37 KB, patch)
2018-08-07 14:36 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 21150: Search for item types inconsistencies (4.80 KB, patch)
2018-08-08 11:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21150: add the biblionumber to the output (1.42 KB, patch)
2018-08-08 11:46 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2018-08-02 15:24:38 UTC
We should test the item-level_itypes, biblioitems.itemtype, items.itype and the itemtypes table.
Comment 1 Katrin Fischer 2018-08-02 15:25:48 UTC
could we make the test on biblioitems.itemtype optional? We never set it (union catalog, can't save fields from being overwritten etc.)
Comment 2 Jonathan Druart 2018-08-02 15:36:52 UTC
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?
Comment 3 Katrin Fischer 2018-08-02 15:44:47 UTC
Yes, it does!
Comment 4 Jonathan Druart 2018-08-03 18:04:40 UTC Comment hidden (obsolete)
Comment 5 Owen Leonard 2018-08-07 13:41:38 UTC
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>
Comment 6 Owen Leonard 2018-08-07 13:43:30 UTC
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.
Comment 7 Jonathan Druart 2018-08-07 14:15:14 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2018-08-07 14:15:36 UTC
(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?
Comment 9 Owen Leonard 2018-08-07 14:36:22 UTC
Created attachment 77537 [details] [review]
Bug 21150: add the biblionumber to the output

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 10 Katrin Fischer 2018-08-08 11:46:17 UTC
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>
Comment 11 Katrin Fischer 2018-08-08 11:46:21 UTC
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>
Comment 12 Nick Clemens 2018-08-22 15:02:08 UTC
Awesome work all!

Pushed to master for 18.11
Comment 13 Martin Renvoize 2018-08-24 11:58:02 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 14 Fridolin SOMERS 2018-09-21 13:54:39 UTC
Pushed to 17.11.x for 17.11.10