Bugzilla – Attachment 131998 Details for
Bug 30327
Sort component parts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30327: Sort component parts
0001-Bug-30327-Sort-component-parts.patch (text/plain), 1.13 KB, created by
Johanna Räisä
on 2022-03-22 09:24:14 UTC
(
hide
)
Description:
Bug 30327: Sort component parts
Filename:
MIME Type:
Creator:
Johanna Räisä
Created:
2022-03-22 09:24:14 UTC
Size:
1.13 KB
patch
obsolete
>From 8c92b9ada4d8c11d242bafad3429d1e7e2149f89 Mon Sep 17 00:00:00 2001 >From: Johanna Raisa <johanna.raisa@gmail.com> >Date: Tue, 22 Mar 2022 11:11:22 +0200 >Subject: [PATCH] Bug 30327: Sort component parts > >This patch adds ascending sorting by biblionumber to component parts. > >Test plan: >1) Enable ShowComponentRecords on systempreference >2) Go to detail page of a record which has component parts >3) See that the component parts are in random order >4) Apply the patch >5) Reload the detail page >6) Now the component parts should be in ascending biblionumber order > >Sponsored-by: Koha-Suomi Oy >--- > Koha/Biblio.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 4022819e9c..5e3d372edb 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -547,7 +547,7 @@ sub get_marc_components { > } > ); > } >- $components = $results if defined($results) && @$results; >+ @$components = sort { $searcher->extract_biblionumber($a) <=> $searcher->extract_biblionumber($b) } @$results if defined($results) && @$results; > } > > return $components // []; >-- >2.25.1 >
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 30327
:
131998
|
135550
|
135551
|
135730
|
136256
|
136446
|
136447
|
136448
|
136540
|
136541
|
136542
|
136543
|
136544
|
141731