Bugzilla – Attachment 169889 Details for
Bug 37434
Lists are incorrectly sorted in UNIMARC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC
Bug-37434-Sort-by-publicationyear-when-copyrightda.patch (text/plain), 1.28 KB, created by
Baptiste Wojtkowski (bwoj)
on 2024-07-31 13:17:55 UTC
(
hide
)
Description:
Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2024-07-31 13:17:55 UTC
Size:
1.28 KB
patch
obsolete
>From 4383cd6d55877d93b9f61aa0ff6ccfb0d4e5d3ee Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <bski@laposte.net> >Date: Wed, 31 Jul 2024 14:47:28 +0200 >Subject: [PATCH] Bug 37434: Sort by publicationyear when copyrightdate is set > in UNIMARC > >--- > virtualshelves/shelves.pl | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl >index badd78f..40dccb4 100755 >--- a/virtualshelves/shelves.pl >+++ b/virtualshelves/shelves.pl >@@ -32,6 +32,7 @@ use C4::Members; > use C4::Output qw( pagination_bar output_html_with_http_headers output_and_exit_if_error ); > use C4::XSLT qw( XSLTParse4Display ); > >+use Koha qw (Preference); > use Koha::Biblios; > use Koha::Biblioitems; > use Koha::Items; >@@ -115,6 +116,9 @@ if ( $op eq 'add_form' ) { > $op = $referer; > my $sortfield = $query->param('sortfield'); > $sortfield = 'title' unless grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded ); >+ if ($sortfield == 'copyrightdate' and Preference('marcflavour')=='UNIMARC'){ >+ $sortfield = 'publicationyear'; >+ } > if ( $shelf->can_be_managed( $loggedinuser ) ) { > $shelf->shelfname( scalar $query->param('shelfname') ); > $shelf->sortfield( $sortfield ); >-- >2.43.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 37434
:
169885
|
169886
|
169888
|
169889
|
169891
|
169892
|
169997
|
169998
|
170614