@@ -, +, @@ date is not used --- catalogue/detail.pl | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -314,7 +314,7 @@ foreach my $item (@items) { $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) ); my $copynumber = $item->{'copynumber'}; $item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) ); - foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri)) { + foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri publisheddate)) { # Warning when removing GetItemsInfo - publisheddate (at least) is not part of the items table $itemfields{$_} = 1 if ( $item->{$_} ); } @@ -416,6 +416,7 @@ $template->param( itemdata_uri => $itemfields{uri}, itemdata_copynumber => $itemfields{copynumber}, itemdata_stocknumber => $itemfields{stocknumber}, + itemdata_publisheddate => $itemfields{publisheddate}, volinfo => $itemfields{enumchron}, itemdata_itemnotes => $itemfields{itemnotes}, itemdata_nonpublicnotes => $itemfields{itemnotes_nonpublic}, --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -229,7 +229,13 @@ Home library [% IF ( itemdata_ccode ) %]Collection[% END %] Call number - [% IF volinfo %]Serial enumeration / chronology[% END %] + [% IF volinfo %] + [% IF itemdate_publisheddate #If there is at least one published date, use it for sorting%] + Serial enumeration / chronology + [% ELSE %] + Serial enumeration / chronology + [% END %] + [% END %] Status Last seen Date accessioned @@ -286,7 +292,7 @@ Note that permanent location is a code, and location may be an authval. [% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %] [% IF ( volinfo ) %] - + [% IF itemdate_publisheddate %][% END %] [% IF ( itemdata_enumchron ) %] [% IF item.enumchron && item.serialseq %] [% item.enumchron | html %] --