Description
Jonathan Druart
2016-07-04 16:14:27 UTC
Created attachment 53095 [details] [review] Bug 16850: Add test coverage for CanBookBeIssued Created attachment 53096 [details] [review] Bug 16850: Remove C4::Members::IsMemberBlocked This subroutine is only called once and can be replaced with a call to is_debarred and has_overdues. Note that prior to this patch, IsMemberBlocked copy/paste code from HasOverdues, which did not make sense. Test plan: Debar a patron and make sure he is not able to checkout (the librarian is asked to overwrite if OverduesBlockCirc is set to 'confirmation') Remove the debarment and add overdues to this patron, same as previously, the checkout should be blocked Created attachment 53247 [details] [review] Bug 16850: Remove C4::Members::IsMemberBlocked This subroutine is only called once and can be replaced with a call to is_debarred and has_overdues. Note that prior to this patch, IsMemberBlocked copy/paste code from HasOverdues, which did not make sense. Test plan: Debar a patron and make sure he is not able to checkout (the librarian is asked to overwrite if OverduesBlockCirc is set to 'confirmation') Remove the debarment and add overdues to this patron, same as previously, the checkout should be blocked Created attachment 53512 [details] [review] Bug 16850: Add test coverage for CanBookBeIssued Created attachment 53513 [details] [review] Bug 16850: Remove C4::Members::IsMemberBlocked This subroutine is only called once and can be replaced with a call to is_debarred and has_overdues. Note that prior to this patch, IsMemberBlocked copy/paste code from HasOverdues, which did not make sense. Test plan: Debar a patron and make sure he is not able to checkout (the librarian is asked to overwrite if OverduesBlockCirc is set to 'confirmation') Remove the debarment and add overdues to this patron, same as previously, the checkout should be blocked Created attachment 54005 [details] [review] [SIGNED-OFF] Bug 16850: Add test coverage for CanBookBeIssued Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 54006 [details] [review] [SIGNED-OFF] Bug 16850: Remove C4::Members::IsMemberBlocked This subroutine is only called once and can be replaced with a call to is_debarred and has_overdues. Note that prior to this patch, IsMemberBlocked copy/paste code from HasOverdues, which did not make sense. Test plan: Debar a patron and make sure he is not able to checkout (the librarian is asked to overwrite if OverduesBlockCirc is set to 'confirmation') Remove the debarment and add overdues to this patron, same as previously, the checkout should be blocked Signed-off-by: Owen Leonard <oleonard@myacpl.org> Sorry, patch doesn't apply: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 16850: Add test coverage for CanBookBeIssued Using index info to reconstruct a base tree... M t/db_dependent/Circulation.t Falling back to patching base and 3-way merge... Auto-merging t/db_dependent/Circulation.t Applying: Bug 16850: Remove C4::Members::IsMemberBlocked fatal: sha1 information is lacking or useless (C4/Circulation.pm). error: could not build fake ancestor Also a question: We stopped using debarred/debarment in the GUI in favor of restricted/restrictions - should we not be using is_restricted? Created attachment 55686 [details] [review] Bug 16850: Add test coverage for CanBookBeIssued Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 55687 [details] [review] Bug 16850: Remove C4::Members::IsMemberBlocked This subroutine is only called once and can be replaced with a call to is_debarred and has_overdues. Note that prior to this patch, IsMemberBlocked copy/paste code from HasOverdues, which did not make sense. Test plan: Debar a patron and make sure he is not able to checkout (the librarian is asked to overwrite if OverduesBlockCirc is set to 'confirmation') Remove the debarment and add overdues to this patron, same as previously, the checkout should be blocked Signed-off-by: Owen Leonard <oleonard@myacpl.org> (In reply to Katrin Fischer from comment #8) > Also a question: We stopped using debarred/debarment in the GUI in favor of > restricted/restrictions - should we not be using is_restricted? IMO we should keep debar/debarment/debarred in the code, restrict is too vague. But I can be wrong. Created attachment 56235 [details] [review] Bug 16850: Add test coverage for CanBookBeIssued Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 56236 [details] [review] Bug 16850: Remove C4::Members::IsMemberBlocked This subroutine is only called once and can be replaced with a call to is_debarred and has_overdues. Note that prior to this patch, IsMemberBlocked copy/paste code from HasOverdues, which did not make sense. Test plan: Debar a patron and make sure he is not able to checkout (the librarian is asked to overwrite if OverduesBlockCirc is set to 'confirmation') Remove the debarment and add overdues to this patron, same as previously, the checkout should be blocked Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Pushed to Master - Should be in the November 16.11 release. Thanks! Created attachment 56743 [details] [review] Bug 16850: Adjust number of tests |