[Bug 40370] New: about.pl should NOT say "Run the following SQL to fix the database"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 Bug ID: 40370 Summary: about.pl should NOT say "Run the following SQL to fix the database" Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: About Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org The database audit tool output is meant to be a guideline. It should not be treated as a database repair tool. That's why I included the original warning "WARNING!!! These commands are only suggestions". For instance, if you had a plugin that added a table, the database audit tool would tell you to drop it. And then your Koha plugin is broken. Not a great outcome. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36039 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36039 [Bug 36039] The output of audit_database.pl should be accessible through the UI -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- When I originally wrote the database audit, I thought about outputting the differences differently, but I thought SQL would be the easiest way for people to understand, and it was a simple method provided by SQL::Translator::Diff. Perhaps I should've known that people might not heed the warning. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Note that the impetus for raising this bug was someone on the koha-devel listserv saying they saw the "Warning! These commands are only suggestions" but then they saw "Run the following SQL to fix the database", so they ran the DB audit SQL as is. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Created attachment 184065 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184065&action=edit Bug 40370: Remove incorrect DB audit instruction and fix HTML formatting This change removes the incorrect instruction from about.pl: "Run the following SQL to fix the database" and fixes the HTML formatting so that the line "-- Convert schema '' to '':;" is displayed correctly at the start of the line. Test plan: 0. Apply the patch 1. Go to http://localhost:8081/cgi-bin/koha/about.pl?tab=database 2. Note that "Run the following SQL to fix the database" no longer appears and "--Convert schema '' to '':;" starts at the beginning of the line instead of with leading whitespaces. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- I just ran into a fun issue. When you add a FOREIGN KEY in MySQL/MariaDB, it will silently add an index. So if you don't include an index explicitly in kohastructure.sql, the DB audit will mistakenly tell you to drop an index that should not be dropped. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184065|0 |1 is obsolete| | --- Comment #5 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 184094 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184094&action=edit Bug 40370: Remove incorrect DB audit instruction and fix HTML formatting This change removes the incorrect instruction from about.pl: "Run the following SQL to fix the database" and fixes the HTML formatting so that the line "-- Convert schema '' to '':;" is displayed correctly at the start of the line. Test plan: 0. Apply the patch 1. Go to http://localhost:8081/cgi-bin/koha/about.pl?tab=database 2. Note that "Run the following SQL to fix the database" no longer appears and "--Convert schema '' to '':;" starts at the beginning of the line instead of with leading whitespaces. Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 --- Comment #6 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 184095 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184095&action=edit Bug 40370: (QA follow-up) Change raw filter to html The diff doesn't contain intentional HTML formatting, and pre tags do not prevent un-escaped HTML from being interpreted, so we should not use the raw filter here Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |emily.lamancusa@montgomeryc |y.org |ountymd.gov Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | CC| |emily.lamancusa@montgomeryc | |ountymd.gov Patch complexity|--- |String patch Status|Needs Signoff |Signed Off --- Comment #7 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- This is a clearly reasonable string patch; moving straight to PQA. ...with a follow-up to change the $raw filter to html, as the diff doesn't contain intentional HTML formatting and it's recommended to escape HTML characters inside of <pre> tags (https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/pre#esc...). I hope this isn't an overstep, and I'm happy to move the patch to a separate bug if it is! But it didn't feel like a good use of anyone's time to have two separate bugs to make two string edits to the same line. :) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- (In reply to Emily Lamancusa (emlam) from comment #7)
...with a follow-up to change the $raw filter to html, as the diff doesn't contain intentional HTML formatting and it's recommended to escape HTML characters inside of <pre> tags (https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ pre#escaping_ambiguous_characters). I hope this isn't an overstep, and I'm happy to move the patch to a separate bug if it is! But it didn't feel like a good use of anyone's time to have two separate bugs to make two string edits to the same line. :)
Thanks, Emily. Not an overstep at all. It was a great choice. The thought crossed my mind yesterday, but then I got side-tracked with other things. (Funny enough working on this bug showed me some DB issues with a different bug heh.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.11.00 |25.11.00,25.05.02 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 --- Comment #10 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |Pushed to oldstable Version(s)|25.11.00,25.05.02 |25.11.00,25.05.02,24.11.08 released in| | --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #12 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40370 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org