Bug 24131 - Improved formatting for output of updatedatabase
Summary: Improved formatting for output of updatedatabase
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL: https://gitlab.com/mrenvoize/Koha/-/t...
Keywords:
Depends on:
Blocks: 24696 25104
  Show dependency treegraph
 
Reported: 2019-11-27 16:26 UTC by Martin Renvoize
Modified: 2020-04-15 15:27 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 24131: Move the print statement to a new subroutine (10.25 KB, patch)
2020-02-06 14:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24131: Handle several descriptions (1.79 KB, patch)
2020-02-06 14:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24131: Move the print statement to a new subroutine (10.32 KB, patch)
2020-02-20 14:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: Handle several descriptions (1.86 KB, patch)
2020-02-20 14:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: (follow-up) Fix and rebase (4.74 KB, patch)
2020-02-20 14:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: Move the print statement to a new subroutine (10.32 KB, patch)
2020-02-24 13:46 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: Handle several descriptions (1.86 KB, patch)
2020-02-24 13:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: (follow-up) Fix and rebase (4.75 KB, patch)
2020-02-24 13:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: (follow-up) Another rebase (2.07 KB, patch)
2020-02-24 13:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: Move the print statement to a new subroutine (10.38 KB, patch)
2020-03-05 01:18 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 24131: Handle several descriptions (1.92 KB, patch)
2020-03-05 01:18 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 24131: (follow-up) Fix and rebase (4.81 KB, patch)
2020-03-05 01:18 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 24131: (follow-up) Another rebase (2.26 KB, patch)
2020-03-05 01:18 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 24131: Move the print statement to a new subroutine (10.38 KB, patch)
2020-03-10 14:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: Handle several descriptions (1.92 KB, patch)
2020-03-10 14:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: (follow-up) Fix and rebase (4.81 KB, patch)
2020-03-10 14:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: (follow-up) Another rebase (5.99 KB, patch)
2020-03-10 14:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: (QA follow-up) Formatting in web client (1.80 KB, patch)
2020-03-10 14:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24131: Remove bullet points for secondary descriptions (1.45 KB, patch)
2020-03-11 11:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24131: Move the print statement to a new subroutine (10.46 KB, patch)
2020-03-11 11:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24131: Handle several descriptions (1.99 KB, patch)
2020-03-11 11:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24131: (follow-up) Fix and rebase (4.88 KB, patch)
2020-03-11 11:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24131: (follow-up) Another rebase (6.07 KB, patch)
2020-03-11 11:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24131: (QA follow-up) Formatting in web client (1.87 KB, patch)
2020-03-11 11:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24131: Remove bullet points for secondary descriptions (1.52 KB, patch)
2020-03-11 11:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24131: Always display bug numbers on 5 characters (1.51 KB, patch)
2020-03-11 11:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24131: Move the print statement to a new subroutine (10.53 KB, patch)
2020-03-20 14:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24131: Handle several descriptions (2.06 KB, patch)
2020-03-20 14:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24131: (follow-up) Fix and rebase (4.96 KB, patch)
2020-03-20 14:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24131: (follow-up) Another rebase (6.15 KB, patch)
2020-03-20 14:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24131: (QA follow-up) Formatting in web client (1.95 KB, patch)
2020-03-20 14:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24131: Remove bullet points for secondary descriptions (1.59 KB, patch)
2020-03-20 14:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24131: Always display bug numbers on 5 characters (1.59 KB, patch)
2020-03-20 14:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug numbers don't align (123.85 KB, image/png)
2020-03-20 14:52 UTC, Kyle M Hall
Details
Bug 24131: Prevent the first description to be displayed twice (1.58 KB, patch)
2020-04-15 13:18 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 Martin Renvoize 2019-11-27 16:26:46 UTC
Some updates include more than just the 'Updated to' text.. like Warnings and Notes to run scripts.

It would be nice to format these nicely in the webinstaller.
Comment 1 Martin Renvoize 2019-12-24 11:06:18 UTC
Perhaps we could convert to using markdown formatted notes in updatedatabase?

I think that could work well on both and line and parsed for the browser view.
Comment 2 Jonathan Druart 2020-02-06 14:30:15 UTC
Created attachment 98536 [details] [review]
Bug 24131: Move the print statement to a new subroutine
Comment 3 Jonathan Druart 2020-02-06 14:30:20 UTC
Created attachment 98537 [details] [review]
Bug 24131: Handle several descriptions
Comment 4 Jonathan Druart 2020-02-06 14:33:16 UTC
What did you have in mind exactly?
It will be hard to make things flexible as we are using a log file to write the output of the script. I have the feeling that if we want flexibility we will need to move stuff to a module.
Maybe also use a DB table to keep track of the upgrades and errors?
Comment 5 Martin Renvoize 2020-02-20 14:33:15 UTC
Created attachment 99315 [details] [review]
Bug 24131: Move the print statement to a new subroutine

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2020-02-20 14:33:18 UTC
Created attachment 99316 [details] [review]
Bug 24131: Handle several descriptions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2020-02-20 14:33:21 UTC
Created attachment 99317 [details] [review]
Bug 24131: (follow-up) Fix and rebase

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2020-02-20 14:35:55 UTC
Well.. this patch doesn't go as far as I was initially thinking and goes in a bit of a different direction.. but I like the factoring out of the version statement and believe it can be used as the basis for more work.

As such, I'm signing if off as is.

I toyed with adding colour output for the terminal, but that is a bigger piece that would require code in the controller to either strip out the color sequences or upgrade them to css classes or something.

I have however added a new bug which adds timestamps to the output based atop this to show where we could go with it.

Signing off
Comment 9 Martin Renvoize 2020-02-20 14:40:52 UTC
One issue I did spot, however, was that the tab spacing is stripped when going via the web installer. It would be good to fix that here.
Comment 10 David Nind 2020-02-22 22:51:53 UTC
Patch no longer applies:

Bug 24131 - Improved formatting for output of updatedatabase

99315 - Bug 24131: Move the print statement to a new subroutine
99316 - Bug 24131: Handle several descriptions
99317 - Bug 24131: (follow-up) Fix and rebase

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 24131: Move the print statement to a new subroutine
Applying: Bug 24131: Handle several descriptions
Applying: Bug 24131: (follow-up) Fix and rebase
error: sha1 information is lacking or useless (installer/data/mysql/updatedatabase.pl).
error: could not build fake ancestor
Patch failed at 0001 Bug 24131: (follow-up) Fix and rebase
Comment 11 Martin Renvoize 2020-02-24 13:46:59 UTC
Created attachment 99521 [details] [review]
Bug 24131: Move the print statement to a new subroutine

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2020-02-24 13:47:03 UTC
Created attachment 99522 [details] [review]
Bug 24131: Handle several descriptions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 13 Martin Renvoize 2020-02-24 13:47:06 UTC
Created attachment 99523 [details] [review]
Bug 24131: (follow-up) Fix and rebase

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 14 Martin Renvoize 2020-02-24 13:47:09 UTC
Created attachment 99524 [details] [review]
Bug 24131: (follow-up) Another rebase
Comment 15 Bernardo Gonzalez Kriegel 2020-03-05 01:18:09 UTC
Created attachment 100161 [details] [review]
Bug 24131: Move the print statement to a new subroutine

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 16 Bernardo Gonzalez Kriegel 2020-03-05 01:18:12 UTC
Created attachment 100162 [details] [review]
Bug 24131: Handle several descriptions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 17 Bernardo Gonzalez Kriegel 2020-03-05 01:18:16 UTC
Created attachment 100163 [details] [review]
Bug 24131: (follow-up) Fix and rebase

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 18 Bernardo Gonzalez Kriegel 2020-03-05 01:18:20 UTC
Created attachment 100164 [details] [review]
Bug 24131: (follow-up) Another rebase

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested loading 19.11 database, then running updatedatabase.pl
on cli, or using webinstaller. Looks better on cli :)
Comment 19 Martin Renvoize 2020-03-10 14:39:22 UTC
Created attachment 100464 [details] [review]
Bug 24131: Move the print statement to a new subroutine

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 20 Martin Renvoize 2020-03-10 14:39:26 UTC
Created attachment 100465 [details] [review]
Bug 24131: Handle several descriptions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 21 Martin Renvoize 2020-03-10 14:39:29 UTC
Created attachment 100466 [details] [review]
Bug 24131: (follow-up) Fix and rebase

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 22 Martin Renvoize 2020-03-10 14:39:32 UTC
Created attachment 100467 [details] [review]
Bug 24131: (follow-up) Another rebase

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 23 Martin Renvoize 2020-03-10 14:39:35 UTC
Created attachment 100468 [details] [review]
Bug 24131: (QA follow-up) Formatting in web client
Comment 24 Jonathan Druart 2020-03-10 19:41:43 UTC
Applying: Bug 24131: (follow-up) Another rebase    
error: sha1 information is lacking or useless (installer/data/mysql/updatedatabase.pl).
error: could not build fake ancestor
Comment 25 Martin Renvoize 2020-03-11 09:20:42 UTC
Hmm.. not sure why we're getting sha1 issue here.. as an alternative I've pushed a branch to my gitlab: https://gitlab.com/mrenvoize/Koha/-/tree/bug_24131
Comment 26 Jonathan Druart 2020-03-11 11:04:31 UTC
Created attachment 100530 [details] [review]
Bug 24131: Remove bullet points for secondary descriptions
Comment 27 Jonathan Druart 2020-03-11 11:05:28 UTC
Created attachment 100531 [details] [review]
Bug 24131: Move the print statement to a new subroutine

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 28 Jonathan Druart 2020-03-11 11:05:32 UTC
Created attachment 100532 [details] [review]
Bug 24131: Handle several descriptions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 29 Jonathan Druart 2020-03-11 11:05:36 UTC
Created attachment 100533 [details] [review]
Bug 24131: (follow-up) Fix and rebase

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 30 Jonathan Druart 2020-03-11 11:05:39 UTC
Created attachment 100534 [details] [review]
Bug 24131: (follow-up) Another rebase

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 31 Jonathan Druart 2020-03-11 11:05:43 UTC
Created attachment 100535 [details] [review]
Bug 24131: (QA follow-up) Formatting in web client

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 32 Jonathan Druart 2020-03-11 11:05:46 UTC
Created attachment 100536 [details] [review]
Bug 24131: Remove bullet points for secondary descriptions

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 33 Jonathan Druart 2020-03-11 11:18:45 UTC
Created attachment 100538 [details] [review]
Bug 24131: Always display bug numbers on 5 characters

To correctly align bug numbers < 10000
Comment 34 Kyle M Hall 2020-03-20 14:50:21 UTC
Created attachment 101155 [details] [review]
Bug 24131: Move the print statement to a new subroutine

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 35 Kyle M Hall 2020-03-20 14:50:33 UTC
Created attachment 101159 [details] [review]
Bug 24131: Handle several descriptions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 36 Kyle M Hall 2020-03-20 14:50:36 UTC
Created attachment 101160 [details] [review]
Bug 24131: (follow-up) Fix and rebase

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 37 Kyle M Hall 2020-03-20 14:50:39 UTC
Created attachment 101162 [details] [review]
Bug 24131: (follow-up) Another rebase

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 38 Kyle M Hall 2020-03-20 14:50:42 UTC
Created attachment 101164 [details] [review]
Bug 24131: (QA follow-up) Formatting in web client

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 39 Kyle M Hall 2020-03-20 14:50:46 UTC
Created attachment 101166 [details] [review]
Bug 24131: Remove bullet points for secondary descriptions

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 40 Kyle M Hall 2020-03-20 14:50:49 UTC
Created attachment 101168 [details] [review]
Bug 24131: Always display bug numbers on 5 characters

To correctly align bug numbers < 10000

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 41 Kyle M Hall 2020-03-20 14:52:02 UTC
Created attachment 101187 [details]
Bug numbers don't align
Comment 42 Kyle M Hall 2020-03-20 14:52:55 UTC
Just a note that 4 character bug numbers won't align due to browsers collapsing whitespace. Not a blocker IMO. Could be solved with CSS or just non-breaking spaces.
Comment 43 Martin Renvoize 2020-03-24 10:42:47 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 44 Joy Nelson 2020-04-03 21:37:05 UTC
enhancement not backported to 19.11.x
Comment 45 Jonathan Druart 2020-04-15 13:18:12 UTC
Created attachment 103001 [details] [review]
Bug 24131: Prevent the first description to be displayed twice

If there are several lines to display, the first one was displayed
twice:
Upgrade to 19.12.00.071 done [13:10:22]: Bug 22887 - Add unique constraint to authorised_values
                                                   - Add unique constraint to authorised_values
                                                   - WARNING - Cannot create unique constraint on authorised_value(category, authorised_value)
                                                   - The following entries are duplicated: COUNTRY:aaa (2)
Comment 46 Martin Renvoize 2020-04-15 13:21:36 UTC
Nice work everyone!

Pushed to master for 20.05