Bugzilla – Attachment 153519 Details for
Bug 32496
Reduce unnecessary unblessings of objects in Circulation.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32496: (QA follow-up) Fix POD and DateTime use
Bug-32496-QA-follow-up-Fix-POD-and-DateTime-use.patch (text/plain), 1.77 KB, created by
Katrin Fischer
on 2023-07-16 13:01:39 UTC
(
hide
)
Description:
Bug 32496: (QA follow-up) Fix POD and DateTime use
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-07-16 13:01:39 UTC
Size:
1.77 KB
patch
obsolete
>From fb1b8ce436f93e16642080a76d8d6298684f3b50 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sun, 16 Jul 2023 13:00:05 +0000 >Subject: [PATCH] Bug 32496: (QA follow-up) Fix POD and DateTime use > > FAIL t/db_dependent/Koha/Object.t > FAIL forbidden patterns > forbidden pattern: Use of DateTime->now should certainly be replaced with dt_from_string (bug 24840) (line 991) > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Circulation.pm | 2 +- > t/db_dependent/Koha/Object.t | 3 +-- > 2 files changed, 2 insertions(+), 3 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 104594bd05..b461ac28b8 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2641,7 +2641,7 @@ sub MarkIssueReturned { > > C<$patron> patron object > >-C<$item> patron object >+C<$item> item object > > C<$datedue> date due DateTime object > >diff --git a/t/db_dependent/Koha/Object.t b/t/db_dependent/Koha/Object.t >index b0ab60447b..c1b0b379d3 100755 >--- a/t/db_dependent/Koha/Object.t >+++ b/t/db_dependent/Koha/Object.t >@@ -20,7 +20,6 @@ use Modern::Perl; > use Test::More tests => 21; > use Test::Exception; > use Test::Warn; >-use DateTime; > > use C4::Context; > use C4::Circulation qw( AddIssue ); >@@ -988,7 +987,7 @@ subtest 'unblessed_all_relateds' => sub { > } > ); > >- my $issue = AddIssue( $patron, $item->barcode, DateTime->now->subtract( days => 1 ) ); >+ my $issue = AddIssue( $patron, $item->barcode, dt_from_string()->subtract( days => 1 ) ); > my $overdues = Koha::Patrons->find( $patron->id )->overdues; # Koha::Patron->overdues prefetches > my $overdue = $overdues->next->unblessed_all_relateds; > is( $overdue->{issue_id}, $issue->issue_id, 'unblessed_all_relateds has field from the original table (issues)' ); >-- >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 32496
:
144722
|
144723
|
144789
|
144804
|
145024
|
145027
|
147158
|
147162
|
150614
|
153017
|
153018
|
153517
|
153518
|
153519
|
156059
|
156060
|
156061
|
156080
|
156081
|
156082
|
156099
|
156102
|
156103