Bugzilla – Attachment 125470 Details for
Bug 23678
Cancel holds in bulk
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23678: (QA follow-up) Use correct indentation
Bug-23678-QA-follow-up-Use-correct-indentation.patch (text/plain), 5.21 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-09-29 23:21:38 UTC
(
hide
)
Description:
Bug 23678: (QA follow-up) Use correct indentation
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-09-29 23:21:38 UTC
Size:
5.21 KB
patch
obsolete
>From 78e6b617d43aa7680b8d3f947ccc3f043c1ce389 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 29 Sep 2021 20:20:38 -0300 >Subject: [PATCH] Bug 23678: (QA follow-up) Use correct indentation > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > circ/waitingreserves.pl | 26 ++++++------- > reserve/request.pl | 82 ++++++++++++++++++++++------------------- > 2 files changed, 58 insertions(+), 50 deletions(-) > >diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl >index ccbab78a2b..d71c53bb77 100755 >--- a/circ/waitingreserves.pl >+++ b/circ/waitingreserves.pl >@@ -73,19 +73,19 @@ if ( C4::Context->preference('IndependentBranches') ) { > } > $template->param( all_branches => 1 ) if $all_branches; > >-if ( $cancelBulk ) { >- my $cancellation_reason = $input->param("cancellation-reason"); >- my @hold_ids = split ',', $input->param("ids"); >- my $params = { >- reason => $cancellation_reason, >- hold_ids => \@hold_ids, >- }; >- my $job_id = Koha::BackgroundJob::BatchCancelHold->new->enqueue($params); >- >- $template->param( >- enqueued => 1, >- job_id => $job_id >- ) >+if ($cancelBulk) { >+ my $reason = $input->param("cancellation-reason"); >+ my @hold_ids = split ',', $input->param("ids"); >+ my $params = { >+ reason => $reason, >+ hold_ids => \@hold_ids, >+ }; >+ my $job_id = Koha::BackgroundJob::BatchCancelHold->new->enqueue($params); >+ >+ $template->param( >+ enqueued => 1, >+ job_id => $job_id >+ ); > } > > my (@reserve_loop, @over_loop); >diff --git a/reserve/request.pl b/reserve/request.pl >index 33adf216ea..95a7fd43d1 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -90,43 +90,51 @@ my $action = $input->param('action'); > $action ||= q{}; > > if ( $action eq 'move' ) { >- my $where = $input->param('where'); >- my $reserve_id = $input->param('reserve_id'); >- my $prev_priority = $input->param('prev_priority'); >- my $next_priority = $input->param('next_priority'); >- my $first_priority = $input->param('first_priority'); >- my $last_priority = $input->param('last_priority'); >- my $hold_itemnumber = $input->param('itemnumber'); >- if ( $prev_priority == 0 && $next_priority == 1 ){ >- C4::Reserves::RevertWaitingStatus({ itemnumber => $hold_itemnumber }); >- } else { >- AlterPriority( $where, $reserve_id, $prev_priority, $next_priority, $first_priority, $last_priority ); >- } >-} elsif ( $action eq 'cancel' ) { >- my $reserve_id = $input->param('reserve_id'); >- my $cancellation_reason = $input->param("cancellation-reason"); >- my $hold = Koha::Holds->find( $reserve_id ); >- $hold->cancel({ cancellation_reason => $cancellation_reason }) if $hold; >-} elsif ( $action eq 'setLowestPriority' ) { >- my $reserve_id = $input->param('reserve_id'); >- ToggleLowestPriority( $reserve_id ); >-} elsif ( $action eq 'toggleSuspend' ) { >- my $reserve_id = $input->param('reserve_id'); >- my $suspend_until = $input->param('suspend_until'); >- ToggleSuspend( $reserve_id, $suspend_until ); >-} elsif ( $action eq 'cancelBulk') { >- my $cancellation_reason = $input->param("cancellation-reason"); >- my @hold_ids = split ',', $input->param("ids"); >- my $params = { >- reason => $cancellation_reason, >- hold_ids => \@hold_ids, >- }; >- my $job_id = Koha::BackgroundJob::BatchCancelHold->new->enqueue($params); >- >- $template->param( >- enqueued => 1, >- job_id => $job_id >- ) >+ my $where = $input->param('where'); >+ my $reserve_id = $input->param('reserve_id'); >+ my $prev_priority = $input->param('prev_priority'); >+ my $next_priority = $input->param('next_priority'); >+ my $first_priority = $input->param('first_priority'); >+ my $last_priority = $input->param('last_priority'); >+ my $hold_itemnumber = $input->param('itemnumber'); >+ if ( $prev_priority == 0 && $next_priority == 1 ) { >+ C4::Reserves::RevertWaitingStatus( { itemnumber => $hold_itemnumber } ); >+ } >+ else { >+ AlterPriority( >+ $where, $reserve_id, $prev_priority, >+ $next_priority, $first_priority, $last_priority >+ ); >+ } >+} >+elsif ( $action eq 'cancel' ) { >+ my $reserve_id = $input->param('reserve_id'); >+ my $cancellation_reason = $input->param("cancellation-reason"); >+ my $hold = Koha::Holds->find($reserve_id); >+ $hold->cancel( { cancellation_reason => $cancellation_reason } ) if $hold; >+} >+elsif ( $action eq 'setLowestPriority' ) { >+ my $reserve_id = $input->param('reserve_id'); >+ ToggleLowestPriority($reserve_id); >+} >+elsif ( $action eq 'toggleSuspend' ) { >+ my $reserve_id = $input->param('reserve_id'); >+ my $suspend_until = $input->param('suspend_until'); >+ ToggleSuspend( $reserve_id, $suspend_until ); >+} >+elsif ( $action eq 'cancelBulk' ) { >+ my $cancellation_reason = $input->param("cancellation-reason"); >+ my @hold_ids = split ',', $input->param("ids"); >+ my $params = { >+ reason => $cancellation_reason, >+ hold_ids => \@hold_ids, >+ }; >+ my $job_id = Koha::BackgroundJob::BatchCancelHold->new->enqueue($params); >+ >+ $template->param( >+ enqueued => 1, >+ job_id => $job_id >+ ); > } > > if ($findborrower) { >-- >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 23678
:
118338
|
118553
|
120265
|
123185
|
123186
|
123187
|
125404
|
125405
|
125406
|
125470
|
125577
|
125578
|
125579
|
125589
|
125590
|
125600
|
125627
|
125628
|
125629
|
125631