Summary: | borrowers.datexpiry eq '0000-00-00' means expired? | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, nick, roch.damour |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20144 | ||
Change sponsored?: | --- | Patch complexity: | Medium patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 20331, 20455 | ||
Attachments: |
Bug 20145: Do not insert 0000-00-00 in patron tests (and more)
Bug 20145: Do not insert 0000-00-00 in patron tests (and more) Bug 20145: Do not insert 0000-00-00 in patron tests (and more) |
Description
Jonathan Druart
2018-02-06 19:47:55 UTC
Created attachment 71633 [details] [review] Bug 20145: Do not insert 0000-00-00 in patron tests (and more) We should call Koha::Patron->is_expired in CanBookBeIssued instead of doing the same calculation. Tests have been adapted to pass with new SQL modes. We should not need to update the values in DB, we already have Bug 14717: Prevent 0000-00-00 dates in patron data (3.21.00.023) Test plan: prove t/db_dependent/Circulation/dateexpiry.t prove t/db_dependent/Koha/Patrons.t must return green Created attachment 71859 [details] [review] Bug 20145: Do not insert 0000-00-00 in patron tests (and more) We should call Koha::Patron->is_expired in CanBookBeIssued instead of doing the same calculation. Tests have been adapted to pass with new SQL modes. We should not need to update the values in DB, we already have Bug 14717: Prevent 0000-00-00 dates in patron data (3.21.00.023) Test plan: prove t/db_dependent/Circulation/dateexpiry.t prove t/db_dependent/Koha/Patrons.t must return green Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> Created attachment 71897 [details] [review] Bug 20145: Do not insert 0000-00-00 in patron tests (and more) We should call Koha::Patron->is_expired in CanBookBeIssued instead of doing the same calculation. Tests have been adapted to pass with new SQL modes. We should not need to update the values in DB, we already have Bug 14717: Prevent 0000-00-00 dates in patron data (3.21.00.023) Test plan: prove t/db_dependent/Circulation/dateexpiry.t prove t/db_dependent/Koha/Patrons.t must return green Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 18.05, thanks to everybody involved! Awsome work all! Pushed to stable for 17.11.04 Pushed to 17.05.x for v17.05.10 In order to apply I added in C4/Circulation.pm (exists in 17.11) : # # BORROWER STATUS # + my $patron = Koha::Patrons->find( $borrower->{borrowernumber} ); |