Bug 22932 - GetLatestSerials should not return formatted date
Summary: GetLatestSerials should not return formatted date
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Josef Moravec
URL:
Keywords:
Depends on: 22934
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-16 20:39 UTC by Andrew Fuerste-Henry
Modified: 2020-06-04 20:32 UTC (History)
4 users (show)

See Also:
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


Attachments
Bug 22932: GetLatestSerials should not return formatted date (6.17 KB, patch)
2019-05-17 13:36 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22932: GetLatestSerials should not return formatted date (6.23 KB, patch)
2019-05-24 19:08 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 22932: GetLatestSerials should not return formatted date (6.28 KB, patch)
2019-05-28 06:22 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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