[Koha-bugs] [Bug 17680] C4::Circulation - Replace GetItemIssue with Koha::Checkouts

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Dec 29 17:05:54 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17680

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #58432|0                           |1
        is obsolete|                            |

--- Comment #11 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 58501
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58501&action=edit
Bug 17680: C4::Circulation - Remove GetItemIssue, complex calls

There are a few calls to GetItemIssue where it's not as easy to make
sure everything will be fine just replacing the calls with a
Koha::Issues->find
- In AddReturn the overdue flag is used (that's why this patch depends
on bug 17689)
- In CanBookBeRenewed, as well as the overdue flag the dates converted
to DateTime were used. It's now our job to convert them when we need
them.
- Same in AddRenewal but we also call _CalculateAndUpdateFine, so we
need to update the variables in this subroutine.

Note that, prior to this patch, AddReturn returned the GetItemIssue
hashref in the $iteminformation. Most of the time this variable is not
used, I have found only 1 place where it's used: circ/returns.pl
TODO: In this script we should call ->is_overdue instead of the
DateTime->compare calls

Test plan:
All the circulation tests must pass (it's how I have caught the specific
cases).
Do some checkins/checkouts/renewal and focus on the due date

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list