Bug 13420: Sort "Serial enumeration" by published date

So far the sorting on volume information is incorrect. It sorts by the
string displayed in the cell, which may not have any logics.

A better solution would be to use Kyle's suggestion, see comments 7, 8,
but it will need much more work.

This patch suggests to use the publication date to sort this column.
Note: In the code there is a switch depending on the existence of
items.publisheddate, but I do not think it is valid, this valid should
always exist if the item is received (did I miss something?)

Test plan:
You need to have different existing subscription, using different
numbering.
On the detail page of the bibliographic record you should be able to
sort the serials (tab "Holdings") by "Serial enumeration".
The sort will now use the publication dates.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit d9485314eb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2019-04-28 22:53:55 -04:00 committed by Lucas Gass
parent 1252f3986b
commit c094c0dfdd
1 changed files with 3 additions and 1 deletions

View File

@ -204,7 +204,7 @@
<th>Home library</th>
[% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %]
<th>Call number</th>
[% IF ( volinfo ) %]<th>Serial enumeration / chronology</th>[% END %]
[% IF volinfo %]<th class="title-string">Serial enumeration / chronology</th>[% END %]
<th>Status</th>
<th class="title-string">Last seen</th>
<th class="title-string">Date accessioned</th>
@ -247,6 +247,7 @@
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
[% IF ( volinfo ) %]
<td class="enumchron">
<span title="[% item.publisheddate | html %]">
[% IF ( itemdata_enumchron ) %]
[% IF item.enumchron && item.serialseq %]
<span class="enum">[% item.enumchron | html %]</span>
@ -263,6 +264,7 @@
<span class="pubdate">([% item.publisheddate | $KohaDates %])</span>
[% END %]
[% END %]
</span>
</td>
[% END %]
<td class="status">