Bug 13420: Sort "Serial enumeration" by published date
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 29 Apr 2019 02:53:55 +0000 (22:53 -0400)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 9 Mar 2020 17:46:02 +0000 (17:46 +0000)
commitc094c0dfdd19e9e1d68801a2d718e1ccf3060b5b
tree32d0a0d8f582feb1baadbfbf7af31223b084bf9a
parent1252f3986b47d671a4d069c7ffe01827e820ee72
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 d9485314eb86c8c5a466aba57c54680f053c79c3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt