[Koha-bugs] [Bug 28015] Inventory tool fails when timeformat=12h

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 15 18:08:45 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28015

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #119376|0                           |1
        is obsolete|                            |

--- Comment #5 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 119672
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119672&action=edit
Bug 28015: Fix inventory for timeformat=12h

Inventory explodes with the following stacktrace if timeformat is set to 12h

Invalid value passed, datelastseen=2021-04-09 12:00 AM expected type is date at
/usr/share/perl5/Exception/Class/Base.pm line 88
        Exception::Class::Base::throw('Koha::Exceptions::Object::BadValue',
'type', 'date', 'value', '2021-04-09 12:00 AM', 'property', 'datelastseen')
called at /kohadevbox/koha/Koha/Object.pm line 196
        Koha::Object::catch {...}
('DBIx::Class::Exception=HASH(0x557a052baeb0)') called at
/usr/share/perl5/Try/Tiny.pm line 124
        Try::Tiny::try('CODE(0x557a051931d8)',
'Try::Tiny::Catch=REF(0x557a052bfc30)') called at
/kohadevbox/koha/Koha/Object.pm line 206
        Koha::Object::store('Koha::Item=HASH(0x557a0521a048)') called at
/kohadevbox/koha/Koha/Item.pm line 202
        Koha::Item::store('Koha::Item=HASH(0x557a0521a048)') called at
/kohadevbox/koha/tools/inventory.pl line 220

Test plan:
Set TimeFormat to 12h
Use the inventory
=> Confirm that it's working with this patch applied

Signed-off-by: Owen Leonard <oleonard at myacpl.org>

Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list