Bugzilla – Attachment 59179 Details for
Bug 17865
If a subscription has no history end date, it shows as expired today in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17865 'If a subscription has no history end date, it shows as expired today in OPAC' fixed
Bug-17865-If-a-subscription-has-no-history-end-dat.patch (text/plain), 2.99 KB, created by
Luke Honiss
on 2017-01-18 20:58:54 UTC
(
hide
)
Description:
Bug 17865 'If a subscription has no history end date, it shows as expired today in OPAC' fixed
Filename:
MIME Type:
Creator:
Luke Honiss
Created:
2017-01-18 20:58:54 UTC
Size:
2.99 KB
patch
obsolete
>From c37c531eb6164e534ff0ec861d850ef62f48a540 Mon Sep 17 00:00:00 2001 >From: Luke Honiss <luke.honiss@gmail.com> >Date: Tue, 17 Jan 2017 02:27:55 +0000 >Subject: [PATCH] Bug 17865 'If a subscription has no history end date, it > shows as expired today in OPAC' fixed > >--TEST PLAN-- >1) View a subscription with no history end date >2) Search for an item with a subcription in OPAC >3) Under subscription tab click more details >4) The end date will be the current date >5) Apply patch and refresh >6) The end date will be replaced with a message >--- > C4/Serials.pm | 8 ++++++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt | 2 ++ > 2 files changed, 8 insertions(+), 2 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 543b1dc..af841f5 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -442,7 +442,11 @@ sub GetSubscriptionsFromBiblionumber { > while ( my $subs = $sth->fetchrow_hashref ) { > $subs->{startdate} = output_pref( { dt => dt_from_string( $subs->{startdate} ), dateonly => 1 } ); > $subs->{histstartdate} = output_pref( { dt => dt_from_string( $subs->{histstartdate} ), dateonly => 1 } ); >- $subs->{histenddate} = output_pref( { dt => dt_from_string( $subs->{histenddate} ), dateonly => 1 } ); >+ if ( defined $subs->{histenddate} ) { >+ $subs->{histenddate} = output_pref( { dt => dt_from_string( $subs->{histenddate} ), dateonly => 1 } ); >+ } else { >+ $subs->{histenddate} = ""; >+ } > $subs->{opacnote} =~ s/\n/\<br\/\>/g; > $subs->{missinglist} =~ s/\n/\<br\/\>/g; > $subs->{recievedlist} =~ s/\n/\<br\/\>/g; >@@ -450,7 +454,7 @@ sub GetSubscriptionsFromBiblionumber { > $subs->{ "numberpattern" . $subs->{numberpattern} } = 1; > $subs->{ "status" . $subs->{'status'} } = 1; > >- if ( $subs->{enddate} eq '0000-00-00' ) { >+ if (not defined $subs->{enddate} ) { > $subs->{enddate} = ''; > } else { > $subs->{enddate} = output_pref( { dt => dt_from_string( $subs->{enddate}), dateonly => 1 } ); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt >index 4517ffc..9425718 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt >@@ -110,6 +110,8 @@ > <p>The first subscription was started on [% subscription_LOO.histstartdate %]</p> > [% IF ( subscription_LOO.histenddate ) %] > <p>The subscription expired on [% subscription_LOO.histenddate %]</p> >+ [% ELSE %] >+ <p>The subscription has no history end date</p> > [% END %] > > <h4>[% subscription_LOO.branchname %]</h4> >-- >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 17865
:
59049
|
59050
|
59179
|
59199
|
60430
|
60453