Bug 13712

Summary: Missing newline in DB update 3.19.00.010
Product: Koha Reporter: Magnus Enger <magnus>
Component: Installation and upgrade (web-based installer)Assignee: Magnus Enger <magnus>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: gmcharlt, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 13712 - Missing newline in DB update 3.19.00.010
[PASSED QA] Bug 13712 - Missing newline in DB update 3.19.00.010

Description Magnus Enger 2015-02-16 08:56:54 UTC
The DB update in updatedatabase.pl looks like this: 

9755 $DBversion = "3.19.00.010";
9756 if ( CheckVersion($DBversion) ) {
9757     $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SessionRestrictionByIP','1','Check for Change in  Remote IP address for Session Security. Disable when remote ip address changes frequently.','','YesNo')");
9758     print "Upgrade to $DBversion done (Bug 5511 - SessionRestrictionByIP)";
9759     SetVersion ($DBversion);
9760 }

The missing newline at the end of line 9758 means that when you run the webinstaller, this update and the next one are displayed on one line/as one bullet point:

* Upgrade to 3.19.00.009 done (Bug 13007 - Add new foreign key suggestions.budgetid)
* Upgrade to 3.19.00.010 done (Bug 5511 - SessionRestrictionByIP)Upgrade to 3.19.00.011 done (Bug 13417: Add permission to delete public lists)

Not a big deal, of course, but it would look better on two lines.
Comment 1 Magnus Enger 2015-02-16 09:54:08 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2015-02-18 12:32:44 UTC
Created attachment 35988 [details] [review]
[PASSED QA] Bug 13712 - Missing newline in DB update 3.19.00.010

To test:
- Make sure your database is pre 3.19.00.010 (for example by loading in
  an older backup)
- Run through the web-based database update (web installer, step 3)
- Verify that updates 3.19.00.010 and 3.19.00.011 are squashed
  together on one line
- Apply the patch
- Reset the database and run the web-based database upgrade again
- Verify that the two uupdates are noe displayed on separate lines
  (as separate bullet points)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Comment 3 Tomás Cohen Arazi 2015-02-18 12:33:14 UTC
Passing this trivial patch.
Comment 4 Tomás Cohen Arazi 2015-02-19 13:12:27 UTC
Patch pushed to master.

Thanks Magnus!