[Bug 18453] New: Syspref ExportCircHistory is broken
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18453 Bug ID: 18453 Summary: Syspref ExportCircHistory is broken Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com The checkouts table on a patron's checkout and detail screen always show a column 'Export' and the 'Export checkouts using format' fields/buttons. They should be hidden if syspref 'ExportCircHistory' is set to 'Don't show'. -- 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=18453 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 62353 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62353&action=edit Bug 18453: Syspref ExportCircHistory is broken The checkouts table on a patron's checkout and detail screen always show a column 'Export' and the 'Export checkouts using format' fields/buttons. They should be hidden if syspref 'ExportCircHistory' is set to 'Don't show'. This patch brings some variables in circulation.tt and in moremember.tt in sync. They are used by the checkouts table (checkouts-table.inc). To test: - Apply patch - Verify that visibility of export fields in checkouts table depends on syspref 'ExportCircHistory' (for both moremember.pl and circulation.pl) - Verify that other functionality behaves as expected on both screens. -- 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=18453 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=18453 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- 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=18453 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62353|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 62362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62362&action=edit [SIGNED-OFF] Bug 18453: Syspref ExportCircHistory is broken The checkouts table on a patron's checkout and detail screen always show a column 'Export' and the 'Export checkouts using format' fields/buttons. They should be hidden if syspref 'ExportCircHistory' is set to 'Don't show'. This patch brings some variables in circulation.tt and in moremember.tt in sync. They are used by the checkouts table (checkouts-table.inc). To test: - Apply patch - Verify that visibility of export fields in checkouts table depends on syspref 'ExportCircHistory' (for both moremember.pl and circulation.pl) - Verify that other functionality behaves as expected on both screens. Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- 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=18453 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 62362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62362 [SIGNED-OFF] Bug 18453: Syspref ExportCircHistory is broken Review of attachment 62362: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=18453&attachment=62362) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ +35,4 @@
var theme = "[% theme %]"; var borrowernumber = "[% borrowernumber %]"; var branchcode = "[% branch %]"; +var exports_enabled = [% Koha.Preference('ExportCircHistory') %];
If the pref is empty, the generated JS will be var exports_enabled = ; And will raise a syntax error. ::: koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ +27,4 @@
<script type="text/JavaScript"> //<![CDATA[ /* Set some variable needed in circulation.js */ +var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
You cannot scan from moremember. @@ +36,3 @@
var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %]; +var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %]; +var script = "circulation";
Did you find where this script variable is used? @@ +43,4 @@
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
+columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
Hum? Why that? We are on moremember, we need to keep the config for moremember. -- 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=18453 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 62393 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62393&action=edit Bug 18453: Hide the export column when needed If exports_enabled is equal to "0" it will be evaluated to true. -- 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=18453 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Depends on| |15498 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Marc, this single line patch seems to solve the issue. Please confirm. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15498 [Bug 15498] Replace ExportWithCsvProfile with ExportCircHistory -- 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=18453 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62393|Bug 18453: Hide the export |[ALTERNATIVE-PATCH] Bug description|column when needed |18453: Hide the export | |column when needed -- 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=18453 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 62394 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62394&action=edit Bug 18453: Remove exports_enabled in circulation_batch_checkouts.tt This is a c/p from circulation.tt, this variable is not needed in this template -- 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=18453 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62362|0 |1 is obsolete| | --- Comment #7 from Marc Véron <veron@veron.ch> --- Created attachment 62399 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62399&action=edit Table broken on moremember.pl Hi Jonathan First I tried a similar one-liner as well (remove the quotes around the value in following line (both circulation.tt and moremember.tt) var exports_enabled = [% Koha.Preference('ExportCircHistory') %]; That makes the value a number and the following works: "bVisible": exports_enabled ? true : false,... But I still had a nasty behaviour on moremember.pl (the check-out column was not visible, if set to visible with button 'Column visibility' it shows up, but the table is broken, see screenshot. It does not happen on the checkout page. The same happens with your two patches applied. So there is more to be investigated. Anyway, I obsolete my first patch. -- 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=18453 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff --- Comment #8 from Marc Véron <veron@veron.ch> --- OK, found. The table problem is an issue with a colum settings in Administration (issues-table > checkin set to hidden by default), for both circulation and patrons. I will file a new bug for that. Setting to Needs Signoff for alternative patches. -- 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=18453 --- Comment #9 from Marc Véron <veron@veron.ch> --- Created attachment 62401 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62401&action=edit Bug 18453: Hide the export column when needed If exports_enabled is equal to "0" it will be evaluated to true. Signed-off-by: Marc Véron <veron@veron.ch> -- 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=18453 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62394|0 |1 is obsolete| | --- Comment #10 from Marc Véron <veron@veron.ch> --- Created attachment 62402 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62402&action=edit Bug 18453: Remove exports_enabled in circulation_batch_checkouts.tt This is a c/p from circulation.tt, this variable is not needed in this template Signed-off-by: Marc Véron <veron@veron.ch> -- 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=18453 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62393|0 |1 is obsolete| | -- 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=18453 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62399|0 |1 is obsolete| | --- Comment #11 from Marc Véron <veron@veron.ch> --- Comment on attachment 62399 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62399 Table broken on moremember.pl Will move this issue to a new bug -- 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=18453 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|Small patch |Trivial patch Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org -- 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=18453 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Syspref ExportCircHistory |"Export" column is not |is broken |hidden when | |ExportCircHistory is off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18453 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18257 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18453 Nick Clemens <nick@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=18453 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62401|0 |1 is obsolete| | Attachment #62402|0 |1 is obsolete| | --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 62694 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62694&action=edit Bug 18453: Hide the export column when needed If exports_enabled is equal to "0" it will be evaluated to true. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18453 --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 62695 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62695&action=edit Bug 18453: Remove exports_enabled in circulation_batch_checkouts.tt This is a c/p from circulation.tt, this variable is not needed in this template Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18453 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18453 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Master |RESOLVED CC| |katrin.fischer@bsz-bw.de --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Dependency is not in 16.11.x. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org