[Bug 39540] New: Add a warning in the circ rules page if a plugin overrides rules
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Bug ID: 39540 Summary: Add a warning in the circ rules page if a plugin overrides rules Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Bug 39405 introduces a way for plugins to override Koha's circulation rules-defined calculation. This can be misleading for users looking at the circulation rules matrix but getting different results than expected. There should be some visual sign the rules they are looking at, might not be effective, and the plugin in question should be mentioned. -- 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=39540 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |39405 Status|NEW |ASSIGNED CC| |tomascohen@gmail.com Assignee|koha-bugs@lists.koha-commun |raphael.straub@kit.edu |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39405 [Bug 39405] Add plugin hook `overwrite_calc_fine` to override fine calculation -- 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=39540 --- Comment #1 from Raphael Straub <raphael.straub@kit.edu> --- Created attachment 180487 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180487&action=edit Bug 39540: Add a warning to the circulation rules page if CalcFine is overwritten. This patch adds a warning to the "Circulation and fine rules" page in "Koha administration" if there is an enabled plugin that implements the overwrite_calc_fine plugin hook. To test: 1) Apply the patch. 2) In your browser go to /cgi-bin/koha/admin/smart-rules.pl and check that there is no warning on the top of the page. 3) Install a plugin that implements overwrite_calc_fine. 4) Reload /cgi-bin/koha/admin/smart-rules.pl and check that now there is a warning that displays the installed plugin's name. Sponsored-by: Karlsruhe Institute of Technology (KIT) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Raphael Straub <raphael.straub@kit.edu> 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=39540 Raphael Straub <raphael.straub@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Change sponsored?|--- |Sponsored CC| |clemens.tubach@kit.edu, | |michael.skarupianski@gmail. | |com, | |michaela.sieber@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- The code is correct. But could you please just add the template variable inside the IF? It would make the code more concise and simpler to track to. The patch wouldn't need to change so many files for tidying the structure too. Something like: ```perl if ( C4::Context->config("enable_plugins") ) { $template->param( overwrite_calc_fine_plugins => [ Koha::Plugins->new->GetPlugins( { method => 'overwrite_calc_fine', } ) ]; } ``` Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Raphael Straub <raphael.straub@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180487|0 |1 is obsolete| | --- Comment #3 from Raphael Straub <raphael.straub@kit.edu> --- Created attachment 180503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180503&action=edit Bug 39540: Add a warning to the circulation rules page if CalcFine is overwritten. This patch adds a warning to the "Circulation and fine rules" page in "Koha administration" if there is an enabled plugin that implements the overwrite_calc_fine plugin hook. To test: 1) Apply the patch. 2) In your browser go to /cgi-bin/koha/admin/smart-rules.pl and check that there is no warning on the top of the page. 3) Install a plugin that implements overwrite_calc_fine. 4) Reload /cgi-bin/koha/admin/smart-rules.pl and check that now there is a warning that displays the installed plugin's name. Sponsored-by: Karlsruhe Institute of Technology (KIT) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 --- Comment #4 from Raphael Straub <raphael.straub@kit.edu> --- (In reply to Tomás Cohen Arazi (tcohen) from comment #2)
The code is correct. But could you please just add the template variable inside the IF? It would make the code more concise and simpler to track to. The patch wouldn't need to change so many files for tidying the structure too. Yes, this is better. The updated patch is attached.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Raphael Straub <raphael.straub@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180503|0 |1 is obsolete| | --- Comment #5 from Raphael Straub <raphael.straub@kit.edu> --- Created attachment 180513 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180513&action=edit Bug 39540: Add a warning to the circulation rules page if CalcFine is overwritten. This patch adds a warning to the "Circulation and fine rules" page in "Koha administration" if there is an enabled plugin that implements the overwrite_calc_fine plugin hook. To test: 1) Apply the patch. 2) In your browser go to /cgi-bin/koha/admin/smart-rules.pl and check that there is no warning on the top of the page. 3) Install a plugin that implements overwrite_calc_fine. 4) Reload /cgi-bin/koha/admin/smart-rules.pl and check that now there is a warning that displays the installed plugin's name. Sponsored-by: Karlsruhe Institute of Technology (KIT) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Raphael Straub <raphael.straub@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180513|0 |1 is obsolete| | --- Comment #6 from Raphael Straub <raphael.straub@kit.edu> --- Created attachment 180518 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180518&action=edit Bug 39540: Add a warning to the circulation rules page if CalcFine is overwritten. This patch adds a warning to the "Circulation and fine rules" page in "Koha administration" if there is an enabled plugin that implements the overwrite_calc_fine plugin hook. To test: 1) Apply the patch. 2) In your browser go to /cgi-bin/koha/admin/smart-rules.pl and check that there is no warning on the top of the page. 3) Install a plugin that implements overwrite_calc_fine. 4) Reload /cgi-bin/koha/admin/smart-rules.pl and check that now there is a warning that displays the installed plugin's name. Sponsored-by: Karlsruhe Institute of Technology (KIT) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Roman Dolny <roman.dolny@jezuici.pl> 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=39540 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180518|0 |1 is obsolete| | --- Comment #7 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 181636 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181636&action=edit Bug 39540: Add a warning to the circulation rules page if CalcFine is overwritten. This patch adds a warning to the "Circulation and fine rules" page in "Koha administration" if there is an enabled plugin that implements the overwrite_calc_fine plugin hook. To test: 1) Apply the patch. 2) In your browser go to /cgi-bin/koha/admin/smart-rules.pl and check that there is no warning on the top of the page. 3) Install a plugin that implements overwrite_calc_fine. 4) Reload /cgi-bin/koha/admin/smart-rules.pl and check that now there is a warning that displays the installed plugin's name. Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_25_05_candidate --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This is basically a follow-up to bug 39405 where this was requested, can we please get QA? :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #181636|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 182638 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182638&action=edit Bug 39540: Add a warning to the circulation rules page if CalcFine is overwritten. This patch adds a warning to the "Circulation and fine rules" page in "Koha administration" if there is an enabled plugin that implements the overwrite_calc_fine plugin hook. To test: 1) Apply the patch. 2) In your browser go to /cgi-bin/koha/admin/smart-rules.pl and check that there is no warning on the top of the page. 3) Install a plugin that implements overwrite_calc_fine. 4) Reload /cgi-bin/koha/admin/smart-rules.pl and check that now there is a warning that displays the installed plugin's name. Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |martin.renvoize@openfifth.c | |o.uk QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Nice work, thanks. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add a warning in the circ |Add a warning in the |rules page if a plugin |circulation rules page if a |overrides rules |plugin overrides rules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_25_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.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=39540 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This adds a warning to the release notes| |circulation rules page when | |a plugin using the | |`overwrite_calc_fine` hook | |is installed and enabled. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39540 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Needs documenting --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 24.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org