[Bug 27644] New: Add button to SQL report editor for inserting runtime parameters
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Bug ID: 27644 Summary: Add button to SQL report editor for inserting runtime parameters Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Reports Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: testopia@bugs.koha-community.org Depends on: 27643 Created attachment 116429 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116429&action=edit Screenshot of the proposed change I can never remember the syntax for adding runtime parameters to SQL reports so I think it would be useful to have a menu of choices for the user to choose from. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27643 [Bug 27643] Add CodeMirror custom syntax highlighting for SQL runtime parameters -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 116496 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116496&action=edit Bug 27644: Add button to SQL report editor for inserting runtime parameters This patch adds a button menu to the SQL report CodeMirror editor for inserting runtime parameters. Each menu item triggers a modal dialog where the user can specify a parameter label and any other relevant option. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff...). - Go to Reports -> Use saved. - Create or edit a report. - You should see a menu button above the SQL editor field, "Insert runtime parameter." - The menu should contain the options "Authorized value," "Date," "Item types," "Libraries," "Patron categories," and "Text field." - Test each option. Each should trigger the display of a modal dialog with a heading which corresponds to your choice. - In all cases except the "Authorized value" choice you should see a single form field for "label." - Enter text in the label field and click the "Insert parameter" button. - The correct runtime parameter should be inserted into the SQL editor. - If you placed a cursor somewhere in the SQL editor first, your parameter should be inserted in that location in the editor. - If you selected some text in the editor before selecting a parameter, the paramter should replace the selected text. - In the case of the "Authorized value" selection, the modal dialog should include both a label field and a field for choosing an authorized value category. - Try submitting the form without selecting an authorized value. It should warn you that the field is required. - After testing the authorized value selection, try inserting another parameter to confirm that the authorized value selection (now hidden) is no longer required. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This patch adds a button release notes| |menu to the SQL report | |CodeMirror editor for | |inserting runtime | |parameters. Each menu item | |triggers a modal dialog | |where the user can specify | |a parameter label and any | |other relevant option. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- This is a great idea, I too can never remember this syntax. This works well when I edit a report. But since the 'Insert runtime parameter' button is only added inside the '[% IF ( editsql ) %]' statement it does not appear when you create a new report. Could we have this for new reports too? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #116496|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 118973 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118973&action=edit Bug 27644: Add button to SQL report editor for inserting runtime parameters This patch adds a button menu to the SQL report CodeMirror editor for inserting runtime parameters. Each menu item triggers a modal dialog where the user can specify a parameter label and any other relevant option. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff...). - Go to Reports -> Use saved. - Create or edit a report. - You should see a menu button above the SQL editor field, "Insert runtime parameter." - The menu should contain the options "Authorized value," "Date," "Item types," "Libraries," "Patron categories," and "Text field." - Test each option. Each should trigger the display of a modal dialog with a heading which corresponds to your choice. - In all cases except the "Authorized value" choice you should see a single form field for "label." - Enter text in the label field and click the "Insert parameter" button. - The correct runtime parameter should be inserted into the SQL editor. - If you placed a cursor somewhere in the SQL editor first, your parameter should be inserted in that location in the editor. - If you selected some text in the editor before selecting a parameter, the paramter should replace the selected text. - In the case of the "Authorized value" selection, the modal dialog should include both a label field and a field for choosing an authorized value category. - Try submitting the form without selecting an authorized value. It should warn you that the field is required. - After testing the authorized value selection, try inserting another parameter to confirm that the authorized value selection (now hidden) is no longer required. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118973|0 |1 is obsolete| | --- Comment #4 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 119039 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119039&action=edit Bug 27644: Add button to SQL report editor for inserting runtime parameters This patch adds a button menu to the SQL report CodeMirror editor for inserting runtime parameters. Each menu item triggers a modal dialog where the user can specify a parameter label and any other relevant option. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff...). - Go to Reports -> Use saved. - Create or edit a report. - You should see a menu button above the SQL editor field, "Insert runtime parameter." - The menu should contain the options "Authorized value," "Date," "Item types," "Libraries," "Patron categories," and "Text field." - Test each option. Each should trigger the display of a modal dialog with a heading which corresponds to your choice. - In all cases except the "Authorized value" choice you should see a single form field for "label." - Enter text in the label field and click the "Insert parameter" button. - The correct runtime parameter should be inserted into the SQL editor. - If you placed a cursor somewhere in the SQL editor first, your parameter should be inserted in that location in the editor. - If you selected some text in the editor before selecting a parameter, the paramter should replace the selected text. - In the case of the "Authorized value" selection, the modal dialog should include both a label field and a field for choosing an authorized value category. - Try submitting the form without selecting an authorized value. It should warn you that the field is required. - After testing the authorized value selection, try inserting another parameter to confirm that the authorized value selection (now hidden) is no longer required. Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |severine.queune@bulac.fr --- Comment #5 from Séverine Queune <severine.queune@bulac.fr> --- Such a nice one, thanks Owen ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This is really nice, but I believe I spotted a translation issue with the default labels: $("#paramLabel").val("Authorized value") for an example. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 119311 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119311&action=edit Bug 27644: (follow-up) Wrap strings in translation function This patch updates the in-template JavaScript so that some English strings which were previously untranslatable. This patch wraps them in the _() function. To test, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation:
gulp po:update cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from JavaScript e.g. misc/translator/po/fr-FR-staff-prog.po - Locate strings pulled from reports/guided_reports_start.tt for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt:1324 #, fuzzy, c-format msgid "Authorized value category:" msgstr "Catégorie de valeur autorisée : " - Edit the "msgstr" string if necessary, or remove the "fuzzy," before "c-format" - Install the updated translation:
perl translate install fr-FR
In the staff interface, switch to the language you're testing. Confirm that your translated strings appear. In this case, test in particular: - The controls on the modal window when you preview a report's SQL from the list of saved reports. - The controls and modal dialog for inserting a runtime parameter. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=27644 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119039|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 119812 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119812&action=edit Bug 27644: Add button to SQL report editor for inserting runtime parameters This patch adds a button menu to the SQL report CodeMirror editor for inserting runtime parameters. Each menu item triggers a modal dialog where the user can specify a parameter label and any other relevant option. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff...). - Go to Reports -> Use saved. - Create or edit a report. - You should see a menu button above the SQL editor field, "Insert runtime parameter." - The menu should contain the options "Authorized value," "Date," "Item types," "Libraries," "Patron categories," and "Text field." - Test each option. Each should trigger the display of a modal dialog with a heading which corresponds to your choice. - In all cases except the "Authorized value" choice you should see a single form field for "label." - Enter text in the label field and click the "Insert parameter" button. - The correct runtime parameter should be inserted into the SQL editor. - If you placed a cursor somewhere in the SQL editor first, your parameter should be inserted in that location in the editor. - If you selected some text in the editor before selecting a parameter, the paramter should replace the selected text. - In the case of the "Authorized value" selection, the modal dialog should include both a label field and a field for choosing an authorized value category. - Try submitting the form without selecting an authorized value. It should warn you that the field is required. - After testing the authorized value selection, try inserting another parameter to confirm that the authorized value selection (now hidden) is no longer required. Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119311|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 119813 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119813&action=edit Bug 27644: (follow-up) Wrap strings in translation function This patch updates the in-template JavaScript so that some English strings which were previously untranslatable. This patch wraps them in the _() function. To test, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation:
gulp po:update cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from JavaScript e.g. misc/translator/po/fr-FR-staff-prog.po - Locate strings pulled from reports/guided_reports_start.tt for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt:1324 #, fuzzy, c-format msgid "Authorized value category:" msgstr "Catégorie de valeur autorisée : " - Edit the "msgstr" string if necessary, or remove the "fuzzy," before "c-format" - Install the updated translation:
perl translate install fr-FR
In the staff interface, switch to the language you're testing. Confirm that your translated strings appear. In this case, test in particular: - The controls on the modal window when you preview a report's SQL from the list of saved reports. - The controls and modal dialog for inserting a runtime parameter. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 119814 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119814&action=edit Bug 27644: (QA follow-up) Remove size=1 from template Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.05.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=27644 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 20.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 UGD <niicoibarra1@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Reports |ILL CC| |niicoibarra1@gmail.com QA Contact|testopia@bugs.koha-communit | |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 UGD <niicoibarra1@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|ILL |Reports QA Contact| |testopia@bugs.koha-communit | |y.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29328 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29328 [Bug 29328] Add "list" to parameter dropdown -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29201 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29201 [Bug 29201] biblio_framework missing form list of runtime parameters when editing SQL reports -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29351 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29351 [Bug 29351] Add missing cn_source parameter to reports parameter menu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29352 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29352 [Bug 29352] Runtime parameter labels should not be said to be optional -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644 UGD <niicoibarra1@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|niicoibarra1@gmail.com | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org