Bug 14422 - Typographical error in updatedatabase.pl
Summary: Typographical error in updatedatabase.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Mark Tompsett
QA Contact: Testopia
URL:
Keywords:
: 7830 (view as bug list)
Depends on: 7144
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-19 12:58 UTC by Mark Tompsett
Modified: 2016-12-05 21:23 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 14422: Typo in updatedatabase.pl (1.75 KB, patch)
2015-06-19 13:05 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 14422: Typo in updatedatabase.pl (2.17 KB, patch)
2015-06-19 14:06 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 14422: Typo in updatedatabase.pl (2.18 KB, patch)
2015-06-19 14:42 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 14422: Typo in updatedatabase.pl (2.34 KB, patch)
2015-06-19 15:16 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14422: Typo in updatedatabase.pl (2.49 KB, patch)
2015-06-19 17:29 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 14422: Typo in updatedatabase.pl (2.79 KB, patch)
2015-06-22 12:30 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Tompsett 2015-06-19 12:58:55 UTC
While testing bug 9006, I discovered this.

$ grep "^sub " C4/Context.pm | cut -f2 -d' ' > ~/subs
$ vi ~/subs
:%s/^/C4::Context->/g
:wq
$ git grep 'C4::Context\->' | grep -v -f ~/subs

Notice the installer/data/mysql/updatedatabase.pl one. What should read 'preference' is typed as 'prefernce'.
Comment 1 Mark Tompsett 2015-06-19 13:05:14 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2015-06-19 14:06:49 UTC Comment hidden (obsolete)
Comment 3 Mark Tompsett 2015-06-19 14:42:28 UTC Comment hidden (obsolete)
Comment 4 Mark Tompsett 2015-06-19 15:16:39 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2015-06-19 17:08:19 UTC
I intentionally added release candidate keywords, so hopefully earlier versions will fix this (3.8.x -> 3.20.x). :)
Comment 6 Bernardo Gonzalez Kriegel 2015-06-19 17:29:11 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2015-06-22 12:30:23 UTC
Created attachment 40462 [details] [review]
Bug 14422: Typo in updatedatabase.pl

TEST PLAN
---------
 1) backup db
 2) git checkout -b my_3.6.x origin/3.6.x
 3) drop db and create blank one
 4) git reset --hard origin/3.6.x
 5) run web installer
 6) set HomeorHoldingBranchReturn system preference to 'holdingbranch'.
 7) create a Default checkout, hold rule
    home -> koha administration -> Circulation and fines rules
    -- I put 10 checkouts total and clicked 'Save'
    -- there currently is not 'returnbranch' in default_circ_rules.
 8) git reset --hard origin/3.20.x
    -- or whatever version you apply this to
       (3.8.x, 3.10.x, 3.14.x, 3.16.x, 3.18.x, or 3.20.x
        -- 3.21.00.008 deletes the systempreference involved)
 9) ./installer/data/mysql/updatedatabase.pl
10) check HomeorHoldingBranchReturn systempreference
    -- Currently says 'holdingbranch', but
       the value of 'returnbranch' in default_circ_rules is
       'homebranch'.
11) repeat steps 3-8
12) apply this patch
13) repeat steps 9-10
    -- Currently says 'holdingbranch', and
       the value of 'returnbranch' in default_circ_rules is
       'holdingbranch'.
14) run koha qa test tools

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested using 3.6.x install, updated to 3.8.x
Value is preserved
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Note: I haven't followed the test plan, but the fix is trivial.
Maybe it could worth to upate 3.21.00.008 and check the value of
HomeOrHoldingBranchReturn before deleting it.
We could raise a warning if HomeOrHoldingBranchReturn ==
'holdingbranch'.
Comment 8 Tomás Cohen Arazi 2015-06-22 14:44:03 UTC
Patch pushed to master.

Thanks Mark!
Comment 9 Chris Cormack 2015-07-06 21:30:25 UTC
Pushed to 3.20.x will be in 3.20.2
Comment 10 Jonathan Druart 2015-07-14 11:26:43 UTC
*** Bug 7830 has been marked as a duplicate of this bug. ***
Comment 11 Liz Rea 2015-07-20 22:10:50 UTC
Pushed to 3.18.x will be in 3.18.09
Comment 12 Mason James 2015-07-25 12:53:56 UTC
Pushed to 3.16.x, will be in 3.16.13