Bugzilla – Attachment 191257 Details for
Bug 37966
When overriding a hold to renew a book the due date becomes "now" if not specified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37966: Add test coverage for AddRenewal with empty due date
853a92b.patch (text/plain), 1.85 KB, created by
Martin Renvoize (ashimema)
on 2026-01-12 14:07:23 UTC
(
hide
)
Description:
Bug 37966: Add test coverage for AddRenewal with empty due date
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-01-12 14:07:23 UTC
Size:
1.85 KB
patch
obsolete
>From 853a92b071c4b339d5f670d9d737c96be42759d8 Mon Sep 17 00:00:00 2001 >From: Michael Hafen <michael.hafen@washk12.org> >Date: Tue, 28 Oct 2025 12:19:27 -0600 >Subject: [PATCH] Bug 37966: Add test coverage for AddRenewal with empty due > date > >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > t/db_dependent/Circulation/issue.t | 35 +++++++++++++++++++++++++++++- > 1 file changed, 34 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation/issue.t b/t/db_dependent/Circulation/issue.t >index e57a09ebbb9..d04248e6ad9 100755 >--- a/t/db_dependent/Circulation/issue.t >+++ b/t/db_dependent/Circulation/issue.t >@@ -18,7 +18,7 @@ > use Modern::Perl; > > use Test::NoWarnings; >-use Test::More tests => 68; >+use Test::More tests => 69; > use DateTime::Duration; > > use t::lib::Mocks; >@@ -421,6 +421,39 @@ is_deeply( > "With issuing rules (renewal allowed, 1 remaining) and with a valid parameter, Getrenewcount of item1 returns 0 renews left" > ); > >+# Check renewal due date when parameter due date is defined but empty >+Koha::CirculationRules->set_rules( >+ { >+ categorycode => undef, >+ itemtype => undef, >+ branchcode => undef, >+ rules => { >+ renewalsallowed => 4, >+ } >+ } >+); >+my $datedue4 = AddRenewal( >+ { >+ borrowernumber => $borrower_id1, >+ itemnumber => $item_id1, >+ branch => $branchcode_1, >+ datedue => "", >+ lastreneweddate => $daysago10 >+ } >+); >+my $datedue4_date = output_pref( >+ { >+ dt => $datedue4, >+ dateformat => 'iso', >+ timeformat => '24hr', >+ dateonly => 1 >+ } >+); >+ok( >+ $datedue4_date ne $today, >+ q{AddRenewal with a defined but empty due date does not set the due date to today} >+); >+ > $dbh->do("DELETE FROM old_issues"); > AddReturn($barcode_1); > my $return = >-- >2.52.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 37966
:
171790
|
179490
|
180478
|
188524
|
190590
|
190591
|
191256
| 191257 |
191258
|
191259