Bug 28776: Warns from GetItemsInfo when biblio marked as serial
authorNick Clemens <nick@bywatersolutions.com>
Wed, 28 Jul 2021 13:32:24 +0000 (13:32 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 18 Aug 2021 12:53:59 +0000 (14:53 +0200)
commit421e3972c67d50a5b3576d77726ee4ac90f6a28b
treed1554a78f3c1f9bf63546029b005fc74eb2ea83c
parent508aa6837cfb2a5c0600e6f51b66c92870d58763
Bug 28776: Warns from GetItemsInfo when biblio marked as serial

GetItemsInfo sorts the items using serial fields if the biblio is
defined as a serial

The fields may not be defined. We can add a fallback to blank in this case

To test:
1 - Mark a record with items as serial in the marc (942$s)
2 - At least one of the items should have no enumchron defined
3 - Load the detail page
4 - Warns in logs:
    [WARN] Use of uninitialized value in string comparison (cmp) at /kohadevbox/koha/C4/Items.pm line 811.
5 - Apply patch and restart all
6 - Reload the details page
7 - No more warns

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Items.pm