Bug 17689

Summary: Add the Koha::Issue->is_overdue method
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, kyle, lisettepalouse+koha
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17796    
Bug Blocks: 17680    
Attachments: Bug 17689: Add the Koha::Issue->is_overdue method
Bug 17689: Add the Koha::Issue->is_overdue method
Bug 17689: Add the Koha::Issue->is_overdue method
Bug 17689: Add the Koha::Checkout->is_overdue method

Description Jonathan Druart 2016-11-28 09:33:26 UTC

    
Comment 1 Jonathan Druart 2016-11-28 09:37:15 UTC
Created attachment 57786 [details] [review]
Bug 17689: Add the Koha::Issue->is_overdue method

This patch adds a new method Koha::Issue->is_overdue and provide tests
to cover it.
The goal is to behave like GetItemIssues set the 'overdue' flag to
issues.
I don't understand why the existing GetItemIssues truncate dates to
minutes, so I did not recreate this behavior.

Test plan:
  prove t/db_dependent/Koha/Issues.t
should return green
Comment 2 Mika 2016-11-29 22:27:57 UTC
Created attachment 57810 [details] [review]
Bug 17689: Add the Koha::Issue->is_overdue method

This patch adds a new method Koha::Issue->is_overdue and provide tests
to cover it.
The goal is to behave like GetItemIssues set the 'overdue' flag to
issues.
I don't understand why the existing GetItemIssues truncate dates to
minutes, so I did not recreate this behavior.

Test plan:
  prove t/db_dependent/Koha/Issues.t
should return green

Signed-off-by: Mika Smith <mikasmith@catalyst.net.nz>
Comment 3 Tomás Cohen Arazi 2016-12-01 17:57:23 UTC
Created attachment 57864 [details] [review]
Bug 17689: Add the Koha::Issue->is_overdue method

This patch adds a new method Koha::Issue->is_overdue and provide tests
to cover it.
The goal is to behave like GetItemIssues set the 'overdue' flag to
issues.
I don't understand why the existing GetItemIssues truncate dates to
minutes, so I did not recreate this behavior.

Test plan:
  prove t/db_dependent/Koha/Issues.t
should return green

Signed-off-by: Mika Smith <mikasmith@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Jonathan Druart 2016-12-20 13:40:12 UTC
Created attachment 58293 [details] [review]
Bug 17689: Add the Koha::Checkout->is_overdue method

This patch adds a new method Koha::Checkout->is_overdue and provide tests
to cover it.
The goal is to behave like GetItemIssues set the 'overdue' flag to
issues.
I don't understand why the existing GetItemIssues truncate dates to
minutes, so I did not recreate this behavior.

Test plan:
  prove t/db_dependent/Koha/Checkouts.t
should return green

Signed-off-by: Mika Smith <mikasmith@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Jonathan Druart 2016-12-20 13:40:53 UTC
Rebased on top of bug 17796 (Move Koha::Issues to Koha::Checkouts)
Comment 6 Kyle M Hall 2016-12-23 11:57:41 UTC
Pushed to master for 17.05, thanks Jonathan!
Comment 7 Katrin Fischer 2016-12-27 22:19:49 UTC
This won't get ported back to 16.11.x as it is an enhancement.