[Bug 16849] New: Move IsDebarred to Koha::Patron->is_debarred
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 Bug ID: 16849 Summary: Move IsDebarred to Koha::Patron->is_debarred Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Blocks: 16846 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16846 [Bug 16846] Move patron related code to Koha::Patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=16849 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53093 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53093&action=edit Bug 16849: Move IsDebarred to Koha::Patron->is_debarred In order to move IsMemberBlocked to Koha::Patron it makes sense to move the code from Koha::Patron::Debarments::IsDebarred to Koha::Patron->is_debarred. Test plan: 1/ Add a restriction to a patron 2/ make sure he is not able to checkout items any more 3/ Make sure he cannot get a discharge 4/ Put a hold and make sure you get "Patron has restrictions" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16850 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16850 [Bug 16850] Move IsMemberBlocked to Koha::Patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16851 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16851 [Bug 16851] Move HasOverdues to Koha::Patron->has_overdues -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #2 from Marc Véron <veron@veron.ch> --- Testing /4 Put a hold and make sure you get "Patron has restrictions": Works on top of Bug 16854 - request.tt: Logic to display messages broken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16854 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 --- Comment #3 from Marc Véron <veron@veron.ch> --- Regarding /3 Make sure he cannot get a discharge I added a manual restriction to a patron, and I can discharge her with and without patch. Should discharges be blocked by restrictions? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |16854 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16854 [Bug 16854] request.tt: Logic to display messages broken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marc Véron from comment #3)
Regarding /3 Make sure he cannot get a discharge
I added a manual restriction to a patron, and I can discharge her with and without patch. Should discharges be blocked by restrictions?
Actually it's a bit tricky :) The expected behavior is: Discharge a patron for the first time will debar the patron and generate a discharge. Click on discharge again: no new discharge will be generated (the pdf will, but no new entries in the discharges table). Remove the debarment and generate a new discharge will create a new entry in the discharges table. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 --- Comment #5 from Marc Véron <veron@veron.ch> --- (In reply to Jonathan Druart from comment #4)
(In reply to Marc Véron from comment #3)
Regarding /3 Make sure he cannot get a discharge
I added a manual restriction to a patron, and I can discharge her with and without patch. Should discharges be blocked by restrictions?
Actually it's a bit tricky :) The expected behavior is: Discharge a patron for the first time will debar the patron and generate a discharge. Click on discharge again: no new discharge will be generated (the pdf will, but no new entries in the discharges table). Remove the debarment and generate a new discharge will create a new entry in the discharges table.
Thanks, Jonathan, for the explanation. Patch works as described and I will sign off. For the records: IMO the behavior (with and without patch) is not optimal: - As far as I understand a patron who has got a discharge should not be able to check out items again (adding a restriction that never expires). - However, if I put a manual restriction to this patron that expires let's say tomorrow, discharging will not add it's own restriction. The day after tomorrow, the patron will be able to check out again (but she has got a discharge). What do you think about? Is that intended or is it a Bug? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53093|0 |1 is obsolete| | --- Comment #6 from Marc Véron <veron@veron.ch> --- Created attachment 53131 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53131&action=edit Bug 16849: Move IsDebarred to Koha::Patron->is_debarred In order to move IsMemberBlocked to Koha::Patron it makes sense to move the code from Koha::Patron::Debarments::IsDebarred to Koha::Patron->is_debarred. Test plan: 1/ Add a restriction to a patron 2/ make sure he is not able to checkout items any more 3/ Make sure he cannot get a discharge 4/ Put a hold and make sure you get "Patron has restrictions" 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=16849 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch 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=16849 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marc Véron from comment #5)
What do you think about? Is that intended or is it a Bug?
I think it's intended: Even if a patron got a discharge, (s)he could come back to the library (next year, or 5 years after). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53131|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53238 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53238&action=edit Bug 16849: Move IsDebarred to Koha::Patron->is_debarred In order to move IsMemberBlocked to Koha::Patron it makes sense to move the code from Koha::Patron::Debarments::IsDebarred to Koha::Patron->is_debarred. Test plan: 1/ Add a restriction to a patron 2/ make sure he is not able to checkout items any more 3/ Make sure he cannot get a discharge 4/ Put a hold and make sure you get "Patron has restrictions" 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=16849 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Patch rebased against master. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 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=16849 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53238|0 |1 is obsolete| | --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 53431 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53431&action=edit Bug 16849: Move IsDebarred to Koha::Patron->is_debarred In order to move IsMemberBlocked to Koha::Patron it makes sense to move the code from Koha::Patron::Debarments::IsDebarred to Koha::Patron->is_debarred. Test plan: 1/ Add a restriction to a patron 2/ make sure he is not able to checkout items any more 3/ Make sure he cannot get a discharge 4/ Put a hold and make sure you get "Patron has restrictions" Signed-off-by: Marc Véron <veron@veron.ch> 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=16849 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16853 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16853 [Bug 16853] Move changepassword to Koha::Patron->update_password -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16849 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #11 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=16849 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17124 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17124 [Bug 17124] DecreaseLoanHighHolds.t does not pass -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org