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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 27 Aug 2021 19:02:15 +0000 (09:02 -1000)
commitf87e8aeab99c4e0da86a2f5349abfe172144c2a5
treeebd77f09eae0e3a11962cd1c4336e81e86a720f6
parentc74c14a4a1a7b4af49d36fbf0b6d356b37536ff0
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6ea41db079ae2b8362608eb35ec64cbc958c315c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Items.pm