]> git.koha-community.org Git - koha.git/commit
Bug 28015: Fix inventory for timeformat=12h
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 9 Apr 2021 09:22:11 +0000 (11:22 +0200)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Sun, 25 Apr 2021 15:57:01 +0000 (15:57 +0000)
commitb6e1652444a162156d041b237aa071ee44486d87
treeb7dc279cac9e13f98d2df94175d270eecc3fc2c1
parentb571ab2546eace9de294fe117eede3125026ba8c
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@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 21ea89d774d50b1667b18e252f56abe295a97d34)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8d5a3f7564de63b38b96d529d867f1241ea38b83)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
tools/inventory.pl