Bugzilla – Attachment 169888 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.27 KB, created by
Baptiste Wojtkowski (bwoj)
on 2024-07-31 13:16:25 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:16:25 UTC
Size:
1.27 KB
patch
obsolete
>From 646ce699e4ffa20a5a366814e11e6ad734bb0272 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..392171c 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; > 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 Koha.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