Bugzilla – Attachment 156839 Details for
Bug 25393
Create separate 'no automatic renewal before' rule
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25393: (QA follow-up) simplify auto_renew condition
Bug-25393-QA-follow-up-simplify-autorenew-conditio.patch (text/plain), 1.35 KB, created by
Nick Clemens (kidclamp)
on 2023-10-11 14:56:45 UTC
(
hide
)
Description:
Bug 25393: (QA follow-up) simplify auto_renew condition
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-10-11 14:56:45 UTC
Size:
1.35 KB
patch
obsolete
>From c69cfe5faf0f821a034a4910de4de1c94d2f8642 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 11 Oct 2023 14:00:08 +0000 >Subject: [PATCH] Bug 25393: (QA follow-up) simplify auto_renew condition > >_CanBookBeAutoRenewed will only ever return 'auto_too_soon' not 'too_soon' so we can do a simple equality check > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Circulation.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 3639596910..b415674cb2 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3103,15 +3103,15 @@ sub CanBookBeRenewed { > } > } > >- if($auto_renew =~ 'too_soon'){ >+ if ( $auto_renew eq 'auto_too_soon' ) { > > # If its cron, tell it it's too soon for a an auto renewal > return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $cron; > > # Check if it's too soon for a manual renewal > my $soonestManual = GetSoonestRenewDate( $patron, $issue ); >- if($soonestManual > dt_from_string()){ >- return (0, "too_soon", { soonest_renew_date => $soonestManual } ) unless $override_limit; >+ if ( $soonestManual > dt_from_string() ) { >+ return ( 0, "too_soon", { soonest_renew_date => $soonestManual } ) unless $override_limit; > } > } > >-- >2.30.2
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 25393
:
154533
|
154534
|
154535
|
154536
|
154537
|
154538
|
154539
|
154540
|
154541
|
154661
|
154662
|
154663
|
154664
|
154665
|
154666
|
154667
|
154668
|
154669
|
155307
|
155308
|
155309
|
155310
|
155311
|
155312
|
155313
|
155314
|
155315
|
156829
|
156830
|
156831
|
156832
|
156833
|
156834
|
156835
|
156836
|
156837
|
156838
| 156839 |
156840