[Koha-bugs] [Bug 27644] Add button to SQL report editor for inserting runtime parameters

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 8 14:35:57 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27644

--- Comment #1 from Owen Leonard <oleonard at 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_client).

- 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.


More information about the Koha-bugs mailing list