reserve/request.pl duplicates the same code as what Koha::Patron::is_expired does, the code should be deleted.
Created attachment 125341 [details] [review] Bug 29116: Use a pre-existing accessor instead of reimplementing it We can use the Koha::Patron::is_expired accessor instead of re-writing it in request.pl. To test: 1) Make that a warning is being shown with and without this patch when placing a hold to an expired patron account
Created attachment 125391 [details] [review] Bug 29116: Use a pre-existing accessor instead of reimplementing it We can use the Koha::Patron::is_expired accessor instead of re-writing it in request.pl. To test: 1) Make that a warning is being shown with and without this patch when placing a hold to an expired patron account Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Always better not to re-invent the wheel :D
Created attachment 125860 [details] [review] Bug 29116: Use a pre-existing accessor instead of reimplementing it We can use the Koha::Patron::is_expired accessor instead of re-writing it in request.pl. To test: 1) Make that a warning is being shown with and without this patch when placing a hold to an expired patron account Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Same file: 266 my $expiry_date = $enrollment->patron->dateexpiry; 267 $member->{expiry} = 0; # flag set if patron account has expired 268 if ($expiry_date and 269 Date_to_Days(split /-/,$date) > Date_to_Days(split /-/,$expiry_date)) { 270 $member->{expiry} = 1; 271 } Can we fix that one as well please?
(In reply to Jonathan Druart from comment #5) > Same file: > > 266 my $expiry_date = $enrollment->patron->dateexpiry; > 267 $member->{expiry} = 0; # flag set if patron account has expired > 268 if ($expiry_date and > 269 Date_to_Days(split /-/,$date) > Date_to_Days(split > /-/,$expiry_date)) { > 270 $member->{expiry} = 1; > 271 } > > Can we fix that one as well please? There's actually more to it, I had opened earlier early a separate bug report for that with a patch: bug 29115. I'm putting this back to PQA.
Pushed to master for 21.11, thanks to everybody involved!