Bugzilla – Attachment 85000 Details for
Bug 21765
AutoUnsuspendReserves manually sets holds fields instead of calling ->resume
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21765: Make AutoUnsuspendReserves call Koha::Hold->resume
Bug-21765-Make-AutoUnsuspendReserves-call-KohaHold.patch (text/plain), 1.40 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-02-11 19:10:03 UTC
(
hide
)
Description:
Bug 21765: Make AutoUnsuspendReserves call Koha::Hold->resume
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-02-11 19:10:03 UTC
Size:
1.40 KB
patch
obsolete
>From e88998bfb1bacbb4e72223e8959cf55dc2c76c5a Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 11 Feb 2019 16:05:23 -0300 >Subject: [PATCH] Bug 21765: Make AutoUnsuspendReserves call Koha::Hold->resume > >This patch makes the mentioned method use the biult-in method for >resuming a suspended hold, instead of manually setting the specific >attributes using the accessors. > >The side effect for this is that HoldsLog is now honoured. > >This patchset also refactors the tests a bit so they rely on the exposed >methods and thus don't rely on specific implementation details (like >suspended hold means a date in suspended_until plus suspended=1). > >To test: >- Apply the regression tests patch >- Run: > $ kshell > k$ prove t/db_dependent/Reserves/AutoUnsuspendReserves.t >=> FAIL: It fails loudly because things are done manually >- Apply this patch >- Run: > k$ prove t/db_dependent/Reserves/AutoUnsuspendReserves.t >=> SUCCESS: Tests pass! >--- > C4/Reserves.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 77880dc737..c9346c0570 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -870,7 +870,7 @@ sub AutoUnsuspendReserves { > > my @holds = Koha::Holds->search( { suspend_until => { '<=' => $today->ymd() } } ); > >- map { $_->suspend(0)->suspend_until(undef)->store() } @holds; >+ map { $_->resume() } @holds; > } > > =head2 ModReserve >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21765
:
84999
|
85000
|
85007
|
85008
|
85386
|
85387