[Bug 17898] New: Add a way to automatically convert SQL reports
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Bug ID: 17898 Summary: Add a way to automatically convert SQL reports Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: gmcharlt@gmail.com Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Bug 17196 move the marcxml out of the biblioitems table. That will break SQL reports using it. It would be handy to propose an automagically way to convert the SQL reports. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org Status|NEW |ASSIGNED Depends on| |17196 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17196 [Bug 17196] Move marcxml out of the biblioitems table -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 58955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58955&action=edit Bug 17898: Automagically convert SQL reports Bug 17196 move the marcxml out of the biblioitems table. That will break SQL reports using it. It would be handy to propose an automagically way to convert the SQL reports. We do not want to update the reports automatically without user inputs, it will be too hasardous. However we can lead the user to convert them. In this patchset I suggest to warn the user if a report is subject to be updated. TODO: Add a way to mark this job done (using a pref?) to remove the check and not to display false positives. Test plan: - Create some SQL reports (see https://wiki.koha-community.org/wiki/SQL_Reports_Library) - Go on the report list page (/reports/guided_reports.pl?phase=Use saved) - For the reports using biblioitems.marcxml you will see a new column warning you that it is obsolete - Click on update link => that will open a modal with the converted SQL query - Click on the update button => you will be informed that the query has been updated If all the reports are updated, the new column "Update" will no longer be displayed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Note that this is not polish, but not needed to as it won't be something used on a daily basis. If someone wants, feel free :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 58961 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58961&action=edit Bug 17898: Followup - udpate templates for bootstrap 3 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com --- Comment #4 from Josef Moravec <josef.moravec@gmail.com> --- As of bug 16239 is pushed, the templates should use bootstrap 3. Also, I tried to update one of my custom reports, but it looks like only first occurence of marcxml was changed... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Bug 17898 depends on bug 17196, which changed state. Bug 17196 Summary: Move marcxml out of the biblioitems table https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17196 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> --- Not sure it is possible automatically, but that would be awesome to also add a "WHERE format='marcxml' and marcflavour=$syspref->{marcflavour}" in the query. That would be needed in the long term anyway. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> --- wonderful job btw ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abl@biblos.pk.edu.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I've been trying to make up my mind before commenting. My conclusion is that this is a really hard task to achieve, and thus the current behaviour (i.e. propose a translated SQL, no magic stuff) is the way to go. I'd put it in a modal, and probably add a legend stating that they should contact someone who knows SQL to check before overwriting the old report (or the list). This is an example that won't work with this simplistic algorithm, but we could go forward without fixing it anyway, as reports are now broken for everyone anyway: $sql = q| SELECT biblionumber, marcxml, biblioitems.issn AS issn FROM biblioitems INNER JOIN biblio USING (biblionumber) WHERE biblionumber = 14|; $expected_converted_sql = q| SELECT biblionumber, metadata, biblioitems.issn AS issn FROM biblioitems INNER JOIN biblio USING (biblionumber) INNER JOIN biblio_metadata USING (biblionumber) WHERE biblionumber = 14|; so the algorithm works basically only if the query uses marcxml exclusively. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #7)
I've been trying to make up my mind before commenting. My conclusion is that this is a really hard task to achieve, and thus the current behaviour (i.e. propose a translated SQL, no magic stuff) is the way to go. I'd put it in a modal, and probably add a legend stating that they should contact someone who knows SQL to check before overwriting the old report (or the list).
This is an example that won't work with this simplistic algorithm, but we could go forward without fixing it anyway, as reports are now broken for everyone anyway:
$sql = q| SELECT biblionumber, marcxml, biblioitems.issn AS issn FROM biblioitems INNER JOIN biblio USING (biblionumber) WHERE biblionumber = 14|;
$expected_converted_sql = q| SELECT biblionumber, metadata, biblioitems.issn AS issn FROM biblioitems INNER JOIN biblio USING (biblionumber) INNER JOIN biblio_metadata USING (biblionumber) WHERE biblionumber = 14|;
so the algorithm works basically only if the query uses marcxml exclusively.
I'm sorry for the first part of my comment, it is already a modal, and has an 'Update' button. I just messed up with the rebase. I'd still add a note. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58955|0 |1 is obsolete| | --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63582 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63582&action=edit Bug 17898: Automagically convert SQL reports Bug 17196 move the marcxml out of the biblioitems table. That will break SQL reports using it. It would be handy to propose an automagically way to convert the SQL reports. We do not want to update the reports automatically without user inputs, it will be too hasardous. However we can lead the user to convert them. In this patchset I suggest to warn the user if a report is subject to be updated. TODO: Add a way to mark this job done (using a pref?) to remove the check and not to display false positives. Test plan: - Create some SQL reports (see https://wiki.koha-community.org/wiki/SQL_Reports_Library) - Go on the report list page (/reports/guided_reports.pl?phase=Use saved) - For the reports using biblioitems.marcxml you will see a new column warning you that it is obsolete - Click on update link => that will open a modal with the converted SQL query - Click on the update button => you will be informed that the query has been updated If all the reports are updated, the new column "Update" will no longer be displayed. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58961|0 |1 is obsolete| | --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63583 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63583&action=edit Bug 17898: Followup - udpate templates for bootstrap 3 Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18642 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18642 [Bug 18642] Internal Server Error in Guided reports wizard -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Looks like this is in master now? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 --- Comment #12 from Marc Véron <veron@veron.ch> --- (In reply to Katrin Fischer from comment #11)
Looks like this is in master now?
Yes, and leads to Bug 18642 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Kyle M Hall <kyle@bywatersolutions.com> 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=17898 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63582|0 |1 is obsolete| | Attachment #63583|0 |1 is obsolete| | --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 63613 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63613&action=edit Bug 17898: Automagically convert SQL reports Bug 17196 move the marcxml out of the biblioitems table. That will break SQL reports using it. It would be handy to propose an automagically way to convert the SQL reports. We do not want to update the reports automatically without user inputs, it will be too hasardous. However we can lead the user to convert them. In this patchset I suggest to warn the user if a report is subject to be updated. TODO: Add a way to mark this job done (using a pref?) to remove the check and not to display false positives. Test plan: - Create some SQL reports (see https://wiki.koha-community.org/wiki/SQL_Reports_Library) - Go on the report list page (/reports/guided_reports.pl?phase=Use saved) - For the reports using biblioitems.marcxml you will see a new column warning you that it is obsolete - Click on update link => that will open a modal with the converted SQL query - Click on the update button => you will be informed that the query has been updated If all the reports are updated, the new column "Update" will no longer be displayed. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 63614 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63614&action=edit Bug 17898: Followup - udpate templates for bootstrap 3 Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Jonathan, Josef! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |Bug 17196 move the marcxml release notes| |out of the biblioitems | |table. | |That breaks SQL | |reports using it. When you | |go into report list page | |(/reports/guided_reports.pl | |?phase=Use saved), | |reports | |using biblioitems.marcxml | |have a new column | |warning | |you that it is obsolete. | |There is an update link | |that help you to modify the | |SQL query. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|Bug 17196 move the marcxml |Bug 17196 moved the column release notes|out of the biblioitems |marcxml out of the |table. |biblioitems table and into |That breaks SQL |a separate one. |reports using it. When you |That will |go into report list page |break any SQL reports using |(/reports/guided_reports.pl |marcxml, but in order to |?phase=Use saved), |make it easy to fix them, a |reports |new column with a warning |using biblioitems.marcxml |has been added to the Saved |have a new column |reports page |warning |(/reports/guided_reports.pl |you that it is obsolete. |?phase=Use saved). There is |There is an update link |also an update link that |that help you to modify the |will help to modify the SQL |SQL query. |query. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18667 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18667 [Bug 18667] Add a way to automatically convert SQL reports -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Depends on bug 17196 which is not part of 16.11.x. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |REOPENED --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, was too early to close - still open bug reports linked to this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=17898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19495 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19495 [Bug 19495] Automatic report conversion needs to do global replace on 'biblioitems' and 'marcxml' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19638 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19638 [Bug 19638] False positives for 'Update SQL' button -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17898 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |39082 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39082 [Bug 39082] Remove or optionally hide biblioitems.metadata warning on saved reports -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org