]> git.koha-community.org Git - koha.git/commit
Bug 22049: Make MarkIssueReturned rely on returndate only
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 28 Dec 2018 17:39:07 +0000 (14:39 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 25 Jan 2019 20:46:47 +0000 (20:46 +0000)
commit3cd669e527be0b6c32ce826e1c9cbec60bda10a7
tree8f24f92cb41d97661ce88fcaa183e4624595b986
parent659253eef12bb213058a8aed835ba6789aa3d9f0
Bug 22049: Make MarkIssueReturned rely on returndate only

This patch changes the params accepted by
C4::Circulation::MarkIssueReturned by removing the $dropbox_branch
param.

This passed branchcode was only used to initialize the Koha::Calendar
object, but the date arithmetic has already taken place in a couple
places before we reach this point. This logic needs to be simplified
(bug 14591), and this is the starting point.

To test:
- Apply this patch
- Run:
  $ git grep MarkIssueReturned
=> SUCCESS: Check all the uses of the function either originally passed
undef, or now pass the same date that would've been calculated anyway,
in the returndate param.
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation/MarkIssueReturned.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Circulation.pm
misc/cronjobs/longoverdue.pl
t/db_dependent/Circulation/MarkIssueReturned.t