Bug 28171: Restore previous sorting behaviour for Serial enumchron column

Before Bug 27980 the sorting was done either by item's publisheddate
if it existed in at least one item. If it didn't exist then the
sorting was done using "h - Serial Enumeration / chronology"
field. This restores this sorting functionality in catalogue/detail.pl
page.

To test:
 1. Create a serial subscription for a biblio, make sure to enable the
    option "Create an item record when receiving this serial"
 2. Receive two serials, so that they have different received dates
    and check that the items are now created to the biblio
 3. Add now two additional items with one having "A" and other having
    "B" in the "h - Serial Enumeration / chronology" field.
 4. Try sorting and notice the items with publisheddate are being
    sorted and ones without stay in the order they happened to be
 5. Remove the items with publisheddate and notice that now items with
    "A" and "B" get sorted correctly

Signed-off-by: Christian Nelson <christian.nelson@tritonia.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Joonas Kylmälä 2021-04-21 19:19:07 +03:00 committed by Kyle M Hall
parent db7596dcdc
commit 5056a37b35

View file

@ -394,7 +394,11 @@ Note that permanent location is a code, and location may be an authval.
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %]
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
[% IF ( volinfo ) %]
<td class="enumchron" data-order="[% item.publisheddate | html %]">
[% IF ( itemdata_publisheddate ) %]
<td class="enumchron" data-order="[% item.publisheddate | html %]">
[% ELSE %]
<td class="enumchron">
[% END %]
[% IF ( itemdata_enumchron ) %]
[% IF item.enumchron && item.serialseq %]
<span class="enum">[% item.enumchron | html %]</span>