Bugzilla – Attachment 146371 Details for
Bug 31212
Datelastseen should be a datetime
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31212: Fix date_from_string and explicitly called output_pref subroutine
Bug-31212-Fix-datefromstring-and-explicitly-called.patch (text/plain), 2.34 KB, created by
Lucas Gass
on 2023-02-07 23:17:24 UTC
(
hide
)
Description:
Bug 31212: Fix date_from_string and explicitly called output_pref subroutine
Filename:
MIME Type:
Creator:
Lucas Gass
Created:
2023-02-07 23:17:24 UTC
Size:
2.34 KB
patch
obsolete
>From f01771aaeb44b9592d6148f93cec0a862a11019d Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 20 Oct 2022 16:29:36 +0000 >Subject: [PATCH] Bug 31212: Fix date_from_string and explicitly called > output_pref subroutine > >Signed-off-by: Ann Flournoy <aflournoy@cityofkeller.com> > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Circulation.pm | 4 ++-- > C4/Items.pm | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 6fcd4918200..83d02308089 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -42,7 +42,7 @@ use Koha::Account; > use Koha::AuthorisedValues; > use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue; > use Koha::Biblioitems; >-use Koha::DateUtils qw( dt_from_string ); >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Calendar; > use Koha::Checkouts; > use Koha::Illrequests; >@@ -1695,7 +1695,7 @@ sub AddIssue { > $item_object->itemlost(0); > $item_object->onloan($datedue->ymd()); > $item_object->datelastborrowed( dt_from_string()->ymd() ); >- $item_object->datelastseen( dt_from_string()->ymd() ); >+ $item_object->datelastseen( dt_from_string() ); > $item_object->store( { log_action => 0, skip_holds_queue => 1 } ); > > # If the item was lost, it has now been found, charge the overdue if necessary >diff --git a/C4/Items.pm b/C4/Items.pm >index b96b7a56bcb..4f1f12d1fdd 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -56,7 +56,7 @@ use DateTime::Format::MySQL; > # debugging; so please don't remove this > > use Koha::AuthorisedValues; >-use Koha::DateUtils qw( dt_from_string ); >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Database; > > use Koha::Biblios; >@@ -406,7 +406,7 @@ sub ModDateLastSeen { > my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 0 }); > > my $item = Koha::Items->find($itemnumber); >- $item->datelastseen(dt_from_string->ymd); >+ $item->datelastseen(dt_from_string); > my $log = $item->itemlost && !$leave_item_lost ? 1 : 0; # If item was lost, record the change to the item > $item->itemlost(0) unless $leave_item_lost; > $item->store({ log_action => $log, skip_record_index => $params->{skip_record_index}, skip_holds_queue => $params->{skip_holds_queue} }); >-- >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 31212
:
138053
|
139510
|
142262
|
142263
|
142264
|
142282
|
142283
|
142284
|
142286
|
142287
|
142288
|
143595
|
146369
|
146370
|
146371
|
146372
|
147664
|
147665
|
147666
|
147667
|
148939
|
150378
|
150379
|
150380
|
150381
|
150382
|
150383
|
151189
|
151190
|
151194