[Bug 17522] New: opac-user.pl gives error of OpacRenewalAllowed is enabled
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Bug ID: 17522 Summary: opac-user.pl gives error of OpacRenewalAllowed is enabled Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org If OpacRenewalAllowed is enabled, the following error message is displayed: Template process failed: undef error - The method is_expired is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 56999 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56999&action=edit Bug 17522 - opac-user.pl gives error of OpacRenewalAllowed is enabled If OpacRenewalAllowed is enabled, the following error message is displayed: Template process failed: undef error - The method is_expired is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121. Test Plan: 1) Check out an item for a patron 2) Enable OpacRenewalAllowed 3) Log in as that patron, go to opac-user.pl 4) Note the error 5) Apply this patch 6) Reload opac-user.pl 7) Page should now load! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |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=17522 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 17517 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think the patch is not correct: [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && Koha.Preference('BlockExpiredPatronOpacActions') ) ) %] will only check the preference, but this works differently. The preference is only the default, that can be overwritten by patron category. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |blocker -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56999|0 |1 is obsolete| | --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 57047 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57047&action=edit Bug 17522 - opac-user.pl gives error of OpacRenewalAllowed is enabled If OpacRenewalAllowed is enabled, the following error message is displayed: Template process failed: undef error - The method is_expired is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121. Test Plan: 1) Check out an item for a patron 2) Enable OpacRenewalAllowed 3) Log in as that patron, go to opac-user.pl 4) Note the error 5) Apply this patch 6) Reload opac-user.pl 7) Page should now load! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57047|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 57048 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57048&action=edit Bug 17522 - opac-user.pl gives error of OpacRenewalAllowed is enabled If OpacRenewalAllowed is enabled, the following error message is displayed: Template process failed: undef error - The method is_expired is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121. Test Plan: 1) Check out an item for a patron 2) Enable OpacRenewalAllowed 3) Log in as that patron, go to opac-user.pl 4) Note the error 5) Apply this patch 6) Reload opac-user.pl 7) Page should now load! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 57048 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57048 Bug 17522 - opac-user.pl gives error of OpacRenewalAllowed is enabled Review of attachment 57048: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17522&attachment=57048) ----------------------------------------------------------------- ::: Koha/Patron.pm @@ +467,5 @@
+=head3 should_block_expired_patron_opac_actions + +=cut + +sub should_block_expired_patron_opac_actions {
It sounds to me that this method should actually override Koha::Patron::Category->BlockExpiredPatronOpacActions, don't you think? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57048|0 |1 is obsolete| | --- Comment #7 from Marc Véron <veron@veron.ch> --- Created attachment 57102 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57102&action=edit Bug 17522 - opac-user.pl gives error of OpacRenewalAllowed is enabled If OpacRenewalAllowed is enabled, the following error message is displayed: Template process failed: undef error - The method is_expired is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121. Test Plan: 1) Check out an item for a patron 2) Enable OpacRenewalAllowed 3) Log in as that patron, go to opac-user.pl 4) Note the error 5) Apply this patch 6) Reload opac-user.pl 7) Page should now load! Problem reproduced, patch fixes it. Signing off to move it forward. However see comment #6 for QA Signed-off-by: Marc Véron <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=17522 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off 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=17522 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |In Discussion --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #6)
Comment on attachment 57048 [details] [review] Bug 17522 - opac-user.pl gives error of OpacRenewalAllowed is enabled
Review of attachment 57048 [details] [review]: -----------------------------------------------------------------
::: Koha/Patron.pm @@ +467,5 @@
+=head3 should_block_expired_patron_opac_actions + +=cut + +sub should_block_expired_patron_opac_actions {
It sounds to me that this method should actually override Koha::Patron::Category->BlockExpiredPatronOpacActions, don't you think?
This is waiting for an answer. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 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=17522 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17579 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Also note that Koha::Patron->is_expired is added by bug 17579. It is much more robust and covered by tests than the one provided in this patch. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17579 [Bug 17579] Add the Koha::Patron->is_expired method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #8)
(In reply to Jonathan Druart from comment #6)
It sounds to me that this method should actually override Koha::Patron::Category->BlockExpiredPatronOpacActions, don't you think?
This is waiting for an answer.
This has been done on bug 17578. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17578 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17578 [Bug 17578] Replace GetMemberDetails with GetMember -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Jonathan, what are your suggested next steps? Not sure I understand the different dependencies. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Caused by bug 14610. I am going to propose a way to fix this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|17578 |17604 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17578 [Bug 17578] Replace GetMemberDetails with GetMember https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17604 [Bug 17604] Add the Koha::Patron::Category->effective_BlockExpiredPatronOpacActions method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |14610 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14610 [Bug 14610] Add ability to place article requests in Koha -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57102|0 |1 is obsolete| | --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 57414 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57414&action=edit Bug 17522: Fix opac-user.pl if OpacRenewalAllowed is set This patch fixes a bug added by commit 81a04af27804621609004dc370284413baa5caa2 Bug 14610 - Add and update scripts If OpacRenewalAllowed is enabled, the following error message is displayed: Template process failed: undef error - The method is_expired is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121. The is_expired and BlockExpiredPatronOpacActions methods did not exist for the Koha::Patron object. These 2 values were returned by GetMemberDetails. To fix this, we need bug 17579 which introduces the Koha::Patron->is_expired method and also bug 17604 for the Koha::Patron->effective_BlockExpiredPatronOpacActions. Test Plan: 1) Check out an item for a patron 2) Enable OpacRenewalAllowed 3) Log in as that patron, go to opac-user.pl 4) Note the error 5) Apply this patch 6) Reload opac-user.pl 7) Page should now load! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- % git log --oneline 25b6a92 Bug 17522: Fix opac-user.pl if OpacRenewalAllowed is set 2da5f21 Bug 17604: GetMemberDetails - Add Koha::Patron::Category->effective_BlockExpiredPatronOpacActions 2c69552 Bug 17555: Add Koha::Patron->category aafa890 Bug 17579: Make sure we are testing the real life ea99ecd Bug 17579: Add the Koha::Patron->is_expired 56baeb1 Bug 17594: Make Koha::Object->discard_changes available -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Koha::Patron->effective_BlockExpiredPatronOpacActions ? Nice ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57414|0 |1 is obsolete| | --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 57415 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57415&action=edit Bug 17522: Fix opac-user.pl if OpacRenewalAllowed is set This patch fixes a bug added by commit 81a04af27804621609004dc370284413baa5caa2 Bug 14610 - Add and update scripts If OpacRenewalAllowed is enabled, the following error message is displayed: Template process failed: undef error - The method is_expired is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121. The is_expired and BlockExpiredPatronOpacActions methods did not exist for the Koha::Patron object. These 2 values were returned by GetMemberDetails. To fix this, we need bug 17579 which introduces the Koha::Patron->is_expired method and also bug 17604 for the Koha::Patron->effective_BlockExpiredPatronOpacActions. Test Plan: 1) Check out an item for a patron 2) Enable OpacRenewalAllowed 3) Log in as that patron, go to opac-user.pl 4) Note the error 5) Apply this patch 6) Reload opac-user.pl 7) Page should now load! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #15)
Koha::Patron->effective_BlockExpiredPatronOpacActions ? Nice ;)
Oops, it's Koha::Patron::Category->effective_BlockExpiredPatronOpacActions indeed. I am tired of dependencies... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kyle@bywatersolutions.com |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Josef Moravec <josef.moravec@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=17522 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57415|0 |1 is obsolete| | --- Comment #18 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 57478 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57478&action=edit [SIGNED-OFF] Bug 17522: Fix opac-user.pl if OpacRenewalAllowed is set This patch fixes a bug added by commit 81a04af27804621609004dc370284413baa5caa2 Bug 14610 - Add and update scripts If OpacRenewalAllowed is enabled, the following error message is displayed: Template process failed: undef error - The method is_expired is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121. The is_expired and BlockExpiredPatronOpacActions methods did not exist for the Koha::Patron object. These 2 values were returned by GetMemberDetails. To fix this, we need bug 17579 which introduces the Koha::Patron->is_expired method and also bug 17604 for the Koha::Patron->effective_BlockExpiredPatronOpacActions. Test Plan: 1) Check out an item for a patron 2) Enable OpacRenewalAllowed 3) Log in as that patron, go to opac-user.pl 4) Note the error 5) Apply this patch 6) Reload opac-user.pl 7) Page should now load! Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Tomás Cohen Arazi <tomascohen@gmail.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=17522 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57478|0 |1 is obsolete| | --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 57505 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57505&action=edit Bug 17522: Fix opac-user.pl if OpacRenewalAllowed is set This patch fixes a bug added by commit 81a04af27804621609004dc370284413baa5caa2 Bug 14610 - Add and update scripts If OpacRenewalAllowed is enabled, the following error message is displayed: Template process failed: undef error - The method is_expired is not covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121. The is_expired and BlockExpiredPatronOpacActions methods did not exist for the Koha::Patron object. These 2 values were returned by GetMemberDetails. To fix this, we need bug 17579 which introduces the Koha::Patron->is_expired method and also bug 17604 for the Koha::Patron->effective_BlockExpiredPatronOpacActions. Test Plan: 1) Check out an item for a patron 2) Enable OpacRenewalAllowed 3) Log in as that patron, go to opac-user.pl 4) Note the error 5) Apply this patch 6) Reload opac-user.pl 7) Page should now load! Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=17522 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #20 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17522 Bug 17522 depends on bug 17604, which changed state. Bug 17604 Summary: Add the Koha::Patron::Category->effective_BlockExpiredPatronOpacActions method https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17604 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=17522 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #21 from Mason James <mtj@kohaaloha.com> --- Blocked by new-feature, skipping for 16.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org