Bug 28776 - Warns from GetItemsInfo when biblio marked as serial
Summary: Warns from GetItemsInfo when biblio marked as serial
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens (kidclamp)
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on:
Blocks: 25790
  Show dependency treegraph
 
Reported: 2021-07-28 13:32 UTC by Nick Clemens (kidclamp)
Modified: 2022-12-12 21:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.03,20.11.10


Attachments
Bug 28776: Warns from GetItemsInfo when biblio marked as serial (1.28 KB, patch)
2021-07-28 13:34 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 28776: Warns from GetItemsInfo when biblio marked as serial (1.39 KB, patch)
2021-08-17 06:24 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28776: Warns from GetItemsInfo when biblio marked as serial (1.45 KB, patch)
2021-08-17 13:05 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2021-07-28 13:32:21 UTC
To recreate:
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.
Comment 1 Nick Clemens (kidclamp) 2021-07-28 13:34:52 UTC
Created attachment 123251 [details] [review]
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
Comment 2 Fridolin Somers 2021-08-17 06:24:20 UTC
Created attachment 123865 [details] [review]
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>

https://bugs.koha-community.org/show_bug.cgi?id=25790
Comment 3 Tomás Cohen Arazi 2021-08-17 13:05:17 UTC
Created attachment 123873 [details] [review]
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>

https://bugs.koha-community.org/show_bug.cgi?id=25790
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Jonathan Druart 2021-08-18 13:36:34 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 5 Kyle M Hall 2021-08-20 17:58:27 UTC
Pushed to 21.05.x for 21.05.03
Comment 6 Fridolin Somers 2021-08-27 19:02:47 UTC
Pushed to 20.11.x for 20.11.10
Comment 7 Victor Grousset/tuxayo 2021-08-31 04:31:09 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.