Bugzilla – Attachment 123865 Details for
Bug 28776
Warns from GetItemsInfo when biblio marked as serial
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28776: Warns from GetItemsInfo when biblio marked as serial
Bug-28776-Warns-from-GetItemsInfo-when-biblio-mark.patch (text/plain), 1.39 KB, created by
Fridolin Somers
on 2021-08-17 06:24:20 UTC
(
hide
)
Description:
Bug 28776: Warns from GetItemsInfo when biblio marked as serial
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2021-08-17 06:24:20 UTC
Size:
1.39 KB
patch
obsolete
>From 0972ebd59d71e80264c7fdb921282c4f51aa9fa2 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 28 Jul 2021 13:32:24 +0000 >Subject: [PATCH] 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 >--- > C4/Items.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 11c6c1d5c4..467f695020 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -808,7 +808,7 @@ sub GetItemsInfo { > } > > return $serial >- ? sort { ($b->{'publisheddate'} || $b->{'enumchron'}) cmp ($a->{'publisheddate'} || $a->{'enumchron'}) } @results >+ ? sort { ($b->{'publisheddate'} || $b->{'enumchron'} || "") cmp ($a->{'publisheddate'} || $a->{'enumchron'} || "") } @results > : @results; > } > >-- >2.32.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28776
:
123251
|
123865
|
123873