Bugzilla – Attachment 89901 Details for
Bug 22932
GetLatestSerials should not return formatted date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22932: GetLatestSerials should not return formatted date
Bug-22932-GetLatestSerials-should-not-return-forma.patch (text/plain), 6.17 KB, created by
Owen Leonard
on 2019-05-17 13:36:56 UTC
(
hide
)
Description:
Bug 22932: GetLatestSerials should not return formatted date
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2019-05-17 13:36:56 UTC
Size:
6.17 KB
patch
obsolete
>From 59acc09845822ee3aeb530a8d0f58325531d7034 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 17 May 2019 13:19:33 +0000 >Subject: [PATCH] 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. >--- > C4/Serials.pm | 2 -- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt | 9 +++++++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 4 ++-- > 4 files changed, 11 insertions(+), 8 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 8069620..4eb23df 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -785,8 +785,6 @@ sub GetLatestSerials { > my @serials; > while ( my $line = $sth->fetchrow_hashref ) { > $line->{ "status" . $line->{status} } = 1; # fills a "statusX" value, used for template status select list >- $line->{planneddate} = output_pref( { dt => dt_from_string( $line->{planneddate} ), dateonly => 1 } ); >- $line->{publisheddate} = output_pref( { dt => dt_from_string( $line->{publisheddate} ), dateonly => 1 } ); > push @serials, $line; > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 6520134..6af2687 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -518,8 +518,8 @@ > [% FOREACH latestserial IN subscription.latestserials %] > <tr> > <td>[% latestserial.serialseq | html %]</td> >- <td>[% latestserial.planneddate | html %]</td> >- <td>[% latestserial.publisheddate | html %]</td> >+ <td><span title="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</span></td> >+ <td><span title="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</span></td> > <td> > [% IF ( latestserial.status1 ) %]Expected[% END %] > [% IF ( latestserial.status2 ) %]Arrived[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt >index b93120f..317bfc4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt >@@ -1,3 +1,4 @@ >+[% USE KohaDates %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Serials › [% title | html %] › [% IF ( op ) %]Create routing list[% ELSE %]Edit routing list[% END %]</title> >@@ -35,8 +36,12 @@ > <ol> > <li><label for="date_selected">Issue: </label> > <select name="date_selected" id="date_selected"> >-[% FOREACH date IN dates %] >-[% IF ( date.selected ) %]<option value="[% date.serialseq | html %] ([% date.publisheddate | html %])" selected="selected">[% date.serialseq | html %] ([% date.publisheddate | html %])</option>[% ELSE %]<option value="[% date.serialseq | html %] ([% date.publisheddate | html %])">[% date.serialseq | html %] ([% date.publisheddate | html %])</option>[% END %] >+ [% FOREACH date IN dates %] >+ [% IF ( date.selected ) %] >+ <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])" selected="selected">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option> >+ [% ELSE %] >+ <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option> >+ [% END %] > [% END %] > </select> [% issue | html %]</li> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index d17c6ee..d3e95f0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -853,8 +853,8 @@ > [% FOREACH latestserial IN subscription.latestserials %] > <tr> > <td class="serialseq">[% latestserial.serialseq | html %]</td> >- <td class="publisheddate">[% latestserial.publisheddate | html %]</td> >- <td class="planneddate">[% latestserial.planneddate | html %]</td> >+ <td class="publisheddate"><span title="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</span></td> >+ <td class="planneddate"><span title="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</span></td> > <td class="serial_status"> > [% IF (latestserial.status1 ) %]<span>Expected</span>[% END %] > [% IF (latestserial.status2 ) %]<span>Arrived</span>[% END %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22932
:
89901
|
90083
|
90141