Bug 14427 - Use Koha::version() instead of C4::Context->KOHAVERSION
Summary: Use Koha::version() instead of C4::Context->KOHAVERSION
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: M. Tompsett
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on: 13758 13876
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-19 17:45 UTC by M. Tompsett
Modified: 2016-12-05 21:22 UTC (History)
3 users (show)

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


Attachments
Bug 14427: Use Koha::version instead of C4::Context->KOHAVERSION (1.56 KB, patch)
2015-06-19 18:16 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 14427: Use Koha::version instead of C4::Context->KOHAVERSION (1.62 KB, patch)
2015-06-22 11:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14427: Use Koha::version instead of C4::Context->KOHAVERSION (1.73 KB, patch)
2015-07-03 07:32 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description M. Tompsett 2015-06-19 17:45:06 UTC
While testing bug 9006 and reading bug 13876, KOHAVERSION was discovered in the installer/install.pl script.

Considering other sections use my $var = Koha::version; type code, this upgrade section needs fixing.
Comment 1 M. Tompsett 2015-06-19 18:16:18 UTC Comment hidden (obsolete)
Comment 2 M. Tompsett 2015-06-19 18:22:24 UTC
Also: git grep KOHAVERSION
Should only show release notes entry. :)
Comment 3 Jonathan Druart 2015-06-22 11:21:21 UTC
This is because 13876 and 13758 have been written tested more or less at the same time.
Comment 4 Jonathan Druart 2015-06-22 11:24:24 UTC
The only problem is that the generated log file is named
updatedatabase_2015-06-22T13:18:26_3.2100009_.log
when it should be
updatedatabase_2015-06-22T13:23:31_3.2100009_3.2100010.log
Comment 5 Jonathan Druart 2015-06-22 11:24:57 UTC Comment hidden (obsolete)
Comment 6 Marcel de Rooy 2015-07-03 07:32:47 UTC
Created attachment 40771 [details] [review]
Bug 14427: Use Koha::version instead of C4::Context->KOHAVERSION

While testing bug 9006, I discovered this gem in
installer/install.pl

TEST PLAN
---------
 1) back up DB
 2) drop db and create db
 3) git reset --hard origin/3.20.x
 4) run web installer and all sample data
 5) git reset --hard origin/master
 6) empty your koha intranet error log
 7) run web installer to upgrade
    -- there will be warnings regarding regex around
       installer/install.pl line 328 or so.
       grep "\$kohaversion" ~/koha-dev/var/logs/koha-error_log
 8) repeat steps 2-6
 9) apply this patch
10) run web installer to upgrade
    -- no regex warnings.
       grep "\$kohaversion" ~/koha-dev/var/logs/koha-error_log
11) koha qa test tools

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Tomás Cohen Arazi 2015-07-07 18:29:56 UTC
Patch pushed to master.

Thanks Mark!