Bug 21011

Summary: Data inconsistencies - items.holdingbranch | items.homebranch
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Command-line UtilitiesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, katrin.fischer, martin.renvoize, nick, robin
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 21010, 20509    
Attachments: Bug 21011: Search for items with not defined homebranch and/or holdingbranch
Bug 21011: Search for items with not defined homebranch and/or holdingbranch
Bug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to executable
Bug 21011: Search for items with not defined homebranch and/or holdingbranch
Bug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to executable

Description Jonathan Druart 2018-06-27 18:28:51 UTC
From bug 5789: scripts can fail if items.homebranch and/or items.holdingbranch is not defined

We could provide a script to help people catching these migration issues.
Comment 1 Jonathan Druart 2018-06-27 18:34:48 UTC
Created attachment 76533 [details] [review]
Bug 21011: Search for items with not defined homebranch and/or holdingbranch

From bug 5789: scripts can fail if items.homebranch and/or
items.holdingbranch is not defined

This script will help people catching these migration issues.

Test plan:
Update your items table to set some homebranch or holdingbranch to NULL
Run this script
It will display the different items with not defined values in these
fields.
Comment 2 Josef Moravec 2018-06-27 20:27:19 UTC
Created attachment 76536 [details] [review]
Bug 21011: Search for items with not defined homebranch and/or holdingbranch

From bug 5789: scripts can fail if items.homebranch and/or
items.holdingbranch is not defined

This script will help people catching these migration issues.

Test plan:
Update your items table to set some homebranch or holdingbranch to NULL
Run this script
It will display the different items with not defined values in these
fields.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 3 Josef Moravec 2018-06-27 20:27:23 UTC
Created attachment 76537 [details] [review]
Bug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to executable

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Katrin Fischer 2018-08-01 16:21:22 UTC
Some help with -h would be nice, but not blocker.
Comment 5 Katrin Fischer 2018-08-01 16:23:09 UTC
Created attachment 77384 [details] [review]
Bug 21011: Search for items with not defined homebranch and/or holdingbranch

From bug 5789: scripts can fail if items.homebranch and/or
items.holdingbranch is not defined

This script will help people catching these migration issues.

Test plan:
Update your items table to set some homebranch or holdingbranch to NULL
Run this script
It will display the different items with not defined values in these
fields.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2018-08-01 16:23:14 UTC
Created attachment 77385 [details] [review]
Bug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to executable

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Jonathan Druart 2018-08-01 16:42:02 UTC
(In reply to Katrin Fischer from comment #4)
> Some help with -h would be nice, but not blocker.

Yes, the idea is to collect ideas first. Then it will certainly rewritten depending on the needs we found.
Comment 8 Katrin Fischer 2018-08-01 16:42:56 UTC
Idea: no itemtype set. :)
Comment 9 Jonathan Druart 2018-08-02 15:25:29 UTC
(In reply to Katrin Fischer from comment #8)
> Idea: no itemtype set. :)

I have opened bug 21150 for item types.
Comment 10 Nick Clemens 2018-08-22 15:01:53 UTC
Awesome work all!

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

This only introduces a new command line script which may be helpful to system administrators. As such, with zero outwardly facing changes, I felt it both safe and helpful to backport.
Comment 12 Fridolin Somers 2018-09-21 13:48:55 UTC
Also pushed to 17.11.x for 17.11.10