Bug 21011 - Data inconsistencies - items.holdingbranch | items.homebranch
Summary: Data inconsistencies - items.holdingbranch | items.homebranch
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 21010 20509
  Show dependency treegraph
 
Reported: 2018-06-27 18:28 UTC by Jonathan Druart
Modified: 2018-09-21 13:48 UTC (History)
5 users (show)

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


Attachments
Bug 21011: Search for items with not defined homebranch and/or holdingbranch (3.02 KB, patch)
2018-06-27 18:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21011: Search for items with not defined homebranch and/or holdingbranch (3.07 KB, patch)
2018-06-27 20:27 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to executable (1.52 KB, patch)
2018-06-27 20:27 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 21011: Search for items with not defined homebranch and/or holdingbranch (3.12 KB, patch)
2018-08-01 16:23 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to executable (1.58 KB, patch)
2018-08-01 16:23 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-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