Bug 22932

Summary: GetLatestSerials should not return formatted date
Product: Koha Reporter: Andrew Fuerste-Henry <andrewfh>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Josef Moravec <josef.moravec>
Severity: normal    
Priority: P5 - low CC: josef.moravec, martin.renvoize, maryse.simard, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.06
Bug Depends on: 22934    
Bug Blocks:    
Attachments: Bug 22932: GetLatestSerials should not return formatted date
Bug 22932: GetLatestSerials should not return formatted date
Bug 22932: GetLatestSerials should not return formatted date

Description Andrew Fuerste-Henry 2019-05-16 20:39:05 UTC
When sorting serial issues in the OPAC by date, those dates are sorted alphabetically rather than as dates.
Comment 1 Owen Leonard 2019-05-17 12:15:08 UTC
I'm updating the bug title because the problem can't be solved without changing the way data comes out of GetLatestSerials. It shouldn't return a formatted date--we have $KohaDates for that.
Comment 2 Owen Leonard 2019-05-17 13:36:56 UTC
Created attachment 89901 [details] [review]
Bug 22932: GetLatestSerials should not return formatted date

This patch updates GetLatestSerials in Serials.pm to remove date
formatting. Formatting of dates should be done in the template using
$KohaDates.

To test, apply the patch and locate a bibliographic record in the staff
client which has a subscription with issues.

 - On the bibliographic detail page for that record, view the
   "Subscriptions" tab. Dates in the table of recent issues should be
   formatted correctly.
 - View the details for the subscription in the Serials module. Create
   or edit a routing list for that serial. In the "Issue" dropdown the
   issue dates should be formatted correctly.
 - View the bibliographic detail page for the record in the OPAC. Open
   the "Subscriptions" tab. In the table of recent issues publication
   date and received date should be formatted correctly. The table
   should sort correctly on these dates.

Note: Although opac-ISBDdetail.pl calls GetLatestSerials, as far as I
can tell there is no serial-related output to update. The code appears
to be unused.
Comment 3 Maryse Simard 2019-05-24 19:08:22 UTC
Created attachment 90083 [details] [review]
Bug 22932: GetLatestSerials should not return formatted date

This patch updates GetLatestSerials in Serials.pm to remove date
formatting. Formatting of dates should be done in the template using
$KohaDates.

To test, apply the patch and locate a bibliographic record in the staff
client which has a subscription with issues.

 - On the bibliographic detail page for that record, view the
   "Subscriptions" tab. Dates in the table of recent issues should be
   formatted correctly.
 - View the details for the subscription in the Serials module. Create
   or edit a routing list for that serial. In the "Issue" dropdown the
   issue dates should be formatted correctly.
 - View the bibliographic detail page for the record in the OPAC. Open
   the "Subscriptions" tab. In the table of recent issues publication
   date and received date should be formatted correctly. The table
   should sort correctly on these dates.

Note: Although opac-ISBDdetail.pl calls GetLatestSerials, as far as I
can tell there is no serial-related output to update. The code appears
to be unused.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 4 Josef Moravec 2019-05-28 06:22:04 UTC
Created attachment 90141 [details] [review]
Bug 22932: GetLatestSerials should not return formatted date

This patch updates GetLatestSerials in Serials.pm to remove date
formatting. Formatting of dates should be done in the template using
$KohaDates.

To test, apply the patch and locate a bibliographic record in the staff
client which has a subscription with issues.

 - On the bibliographic detail page for that record, view the
   "Subscriptions" tab. Dates in the table of recent issues should be
   formatted correctly.
 - View the details for the subscription in the Serials module. Create
   or edit a routing list for that serial. In the "Issue" dropdown the
   issue dates should be formatted correctly.
 - View the bibliographic detail page for the record in the OPAC. Open
   the "Subscriptions" tab. In the table of recent issues publication
   date and received date should be formatted correctly. The table
   should sort correctly on these dates.

Note: Although opac-ISBDdetail.pl calls GetLatestSerials, as far as I
can tell there is no serial-related output to update. The code appears
to be unused.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Nick Clemens 2019-05-30 10:39:23 UTC
Awesome work all!

Pushed to master for 19.05
Comment 6 Martin Renvoize 2019-05-30 20:29:18 UTC
Pushed to 18.11.x for 18.11.06