Bugzilla – Attachment 81836 Details for
Bug 21346
Clean up dialogs in returns.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21346: Streamline logic in holds and transfers
Bug-21346-Streamline-logic-in-holds-and-transfers.patch (text/plain), 2.44 KB, created by
Christopher Brannon
on 2018-11-01 20:26:10 UTC
(
hide
)
Description:
Bug 21346: Streamline logic in holds and transfers
Filename:
MIME Type:
Creator:
Christopher Brannon
Created:
2018-11-01 20:26:10 UTC
Size:
2.44 KB
patch
obsolete
>From 67de32a468c53f0a964bb14052aa4fafa93cb5c8 Mon Sep 17 00:00:00 2001 >From: Christopher Brannon <cbrannon@cdalibrary.org> >Date: Thu, 1 Nov 2018 20:21:08 +0000 >Subject: [PATCH] Bug 21346: Streamline logic in holds and transfers > >1) Replaced comparison with string to make testing branch easier. >2) Replaced useless 0 values with undef. > >Does not change any behavior, only simplifies code. >--- > circ/returns.pl | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/circ/returns.pl b/circ/returns.pl >index c2f20efd91..4dd74b2452 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -415,12 +415,12 @@ if ( $messages->{'ResFound'}) { > my $reserve = $messages->{'ResFound'}; > my $patron = Koha::Patrons->find( $reserve->{borrowernumber} ); > my $holdmsgpreferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $reserve->{'borrowernumber'}, message_name => 'Hold_Filled' } ); >- >+ my $branchCheck = ( $userenv_branch eq $reserve->{branchcode} ); > if ( $reserve->{'ResFound'} eq "Reserved" && C4::Context->preference('HoldsAutoFill') ) { > my $item = Koha::Items->find( $itemnumber ); > my $biblio = $item->biblio; > >- my $diffBranchSend = ($userenv_branch ne $reserve->{branchcode}) ? $reserve->{branchcode} : undef; >+ my $diffBranchSend = !$branchCheck ? $reserve->{branchcode} : undef; > ModReserveAffect( $reserve->{itemnumber}, $reserve->{borrowernumber}, $diffBranchSend, $reserve->{reserve_id} ); > my ( $messages, $nextreservinfo ) = GetOtherReserves($reserve->{itemnumber}); > >@@ -447,12 +447,12 @@ if ( $messages->{'ResFound'}) { > elsif ( $reserve->{'ResFound'} eq "Waiting" or $reserve->{'ResFound'} eq "Reserved" ) { > if ( $reserve->{'ResFound'} eq "Waiting" ) { > $template->param( >- waiting => ($userenv_branch eq $reserve->{'branchcode'} ? 1 : 0 ), >+ waiting => $branchCheck ? 1 : undef, > ); > } elsif ( $reserve->{'ResFound'} eq "Reserved" ) { > $template->param( >- intransit => ($userenv_branch eq $reserve->{'branchcode'} ? 0 : 1 ), >- transfertodo => ($userenv_branch eq $reserve->{'branchcode'} ? 0 : 1 ), >+ intransit => $branchCheck ? undef : 1, >+ transfertodo => $branchCheck ? undef : 1, > reserve_id => $reserve->{reserve_id}, > reserved => 1, > ); >-- >2.11.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 21346
:
78724
|
78726
|
78902
|
78915
|
78916
|
78942
|
78943
|
79685
|
79686
|
80879
|
81100
|
81836
|
81853
|
81921
|
81924
|
82049
|
82189
|
82190
|
82191
|
82192
|
82891
|
87625
|
87626
|
87627
|
87628
|
87894
|
87895
|
87896
|
87898