Introduced by bug 2720.
Created attachment 27544 [details] [review] Bug 12134 - Members are restricted even if the debarment is ended Test Plan: 1) Modify borrowers.debarred for a borrower and set the date in the past 2) Try to check out an item to that patron 3) Note you cannot 4) Apply this patch 5) Repeat step 2 6) Note you can now check out items the patron
Created attachment 27546 [details] [review] Bug 12134 - Members are restricted even if the debarment is ended Test Plan: 1) Modify borrowers.debarred for a borrower and set the date in the past 2) Try to check out an item to that patron 3) Note you cannot 4) Apply this patch 5) Repeat step 2 6) Note you can now check out items the patron Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 27547 [details] [review] Bug 12134: Add unit tests to reflect the change in IsDebarred Before Kyle's patch, the test failed. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Good candidate for 3.14.6!
Created attachment 27581 [details] [review] [PASSED QA] Bug 12134 - Members are restricted even if the debarment is ended Test Plan: 1) Modify borrowers.debarred for a borrower and set the date in the past 2) Try to check out an item to that patron 3) Note you cannot 4) Apply this patch 5) Repeat step 2 6) Note you can now check out items the patron Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 27582 [details] [review] [PASSED QA] Bug 12134: Add unit tests to reflect the change in IsDebarred Before Kyle's patch, the test failed. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Passes tests, code makes sense and fixes an important bug.
Created attachment 27607 [details] [review] Bug 12134: (follow-up) Add unit tests to reflect the change in IsDebarred Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Pushed to master, along with a follow-up that repairs one of the new tests. Thanks, Jonathan and Kyle! I think serious thought should be given to removing borrowers.debarred, by the way, in favor of consulting borrower_debarments directly. borrowers.debarred was retained as a performance measure, but I'd like to see proof that querying borrower_debarments is too slow to be worth the risk of bugs like this one.
Patches pushed to 3.14.x, will be in 3.14.06