Bugzilla – Attachment 129397 Details for
Bug 29869
Add Koha::Hold->fill
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29869: Make ModReserveFill a (temporary) wrapper for Koha::Hold->fill
Bug-29869-Make-ModReserveFill-a-temporary-wrapper-.patch (text/plain), 2.21 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-01-13 12:53:20 UTC
(
hide
)
Description:
Bug 29869: Make ModReserveFill a (temporary) wrapper for Koha::Hold->fill
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-01-13 12:53:20 UTC
Size:
2.21 KB
patch
obsolete
>From c460db8af6ea45221a0d8f8bb4805c1c066f39f5 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 13 Jan 2022 09:08:11 -0300 >Subject: [PATCH] Bug 29869: Make ModReserveFill a (temporary) wrapper for > Koha::Hold->fill > >Before diving into removing ModReserveFill, I propose this: > >In order to perform real-life testing of the new Koha::Hold->fill >method, this patch makes the ModReserveFill method, just call the new >one. > >To test: >1. Apply this patchset >2. Run: > $ kshell > k$ prove t/db_dependent/Koha/Hold* \ > t/db_dependent/Hold* \ > t/db_dependent/api/v1/holds.t \ > t/db_dependent/Reserves* \ > t/db_dependent/Circulation* \ > t/db_dependent/SIP/* >=> SUCCESS: Tests pass! >3. Sign off :-D >--- > C4/Reserves.pm | 30 +----------------------------- > 1 file changed, 1 insertion(+), 29 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 1490d5aa88..21a32bb404 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1110,35 +1110,7 @@ sub ModReserveFill { > my $reserve_id = $res->{'reserve_id'}; > > my $hold = Koha::Holds->find($reserve_id); >- # get the priority on this record.... >- my $priority = $hold->priority; >- >- # update the hold statuses, no need to store it though, we will be deleting it anyway >- $hold->set( >- { >- found => 'F', >- priority => 0, >- } >- ); >- >- logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, $hold ) >- if C4::Context->preference('HoldsLog'); >- >- # FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log >- Koha::Old::Hold->new( $hold->unblessed() )->store(); >- >- $hold->delete(); >- >- if ( C4::Context->preference('HoldFeeMode') eq 'any_time_is_collected' ) { >- my $reserve_fee = GetReserveFee( $hold->borrowernumber, $hold->biblionumber ); >- ChargeReserveFee( $hold->borrowernumber, $reserve_fee, $hold->biblio->title ); >- } >- >- # now fix the priority on the others (if the priority wasn't >- # already sorted!).... >- unless ( $priority == 0 ) { >- _FixPriority( { reserve_id => $reserve_id, biblionumber => $hold->biblionumber } ); >- } >+ $hold->fill; > } > > =head2 ModReserveStatus >-- >2.32.0
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 29869
:
129395
|
129396
|
129397
|
129398
|
129400
|
129405
|
129406
|
129407
|
129408
|
129409
|
129417
|
129418
|
129419
|
129420
|
129421
|
129502
|
129503
|
129504
|
129505
|
129506
|
129507