Bugzilla – Attachment 35314 Details for
Bug 6968
Show items expired before today in check expiration of serials page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6968 - Check expiration in serials expired before today
Bug 6968 - Check expiration in serials expired before today.patch (text/plain), 3.48 KB, created by
Charles Farmer
on 2015-01-15 16:20:52 UTC
(
hide
)
Description:
Bug 6968 - Check expiration in serials expired before today
Filename:
MIME Type:
Creator:
Charles Farmer
Created:
2015-01-15 16:20:52 UTC
Size:
3.48 KB
patch
obsolete
>From 55f5ccd9987859c56a78ff93d681cfaae70f9e35 Mon Sep 17 00:00:00 2001 >From: charles <charles@inlibro.com> >Date: Mon, 11 Aug 2014 10:53:01 -0400 >Subject: [PATCH] Patch sponsored by our client http://www.ccsr.qc.ca/ > >The page Check Expiration the in Serials section doesn't show items that expired before today. >There is now a checkbox to add it as an option. > >Took back Maxime Pelletier's patch and applied it to current master. > >The variable 'showexpiredtoday' is not tested against the string 'on' anymore. > > modified: koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt > modified: serials/checkexpiration.pl >--- > .../prog/en/modules/serials/checkexpiration.tt | 9 ++++++++- > serials/checkexpiration.pl | 6 ++++-- > 2 files changed, 12 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt >index 95bfcb8..5fb909d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt >@@ -46,6 +46,7 @@ > <legend>Filter results :</legend> > > <ol> >+ <ol> > <li><label for="title">Title:</label> > <input id="title" type="text" name="title" size="15" value="[% title %]" /></li> > >@@ -57,7 +58,13 @@ > <span class="required">Required</span> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div></li> > </ol> >- >+ >+ <li> >+ <label for="showexpiredtoday">Show expired before today:</label> >+ <input id="showexpiredtoday" type="checkbox" name="showexpiredtoday" >+ [% IF ( showexpiredtoday ) %] checked="checked" [% END %]/> >+ </li> >+ </ol> > </fieldset> > <fieldset class="action"><input type="submit" value="Search" /></fieldset> > </form> >diff --git a/serials/checkexpiration.pl b/serials/checkexpiration.pl >index e24210f..695b3c0 100755 >--- a/serials/checkexpiration.pl >+++ b/serials/checkexpiration.pl >@@ -68,6 +68,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( > my $title = $query->param('title'); > my $issn = $query->param('issn'); > my $date = format_date_in_iso($query->param('date')); >+my $showexpiredtoday = $query->param('showexpiredtoday'); > > if ($date) { > my @subscriptions = GetSubscriptions( $title, $issn ); >@@ -78,10 +79,10 @@ if ($date) { > my $expirationdate = GetExpirationDate($subscriptionid); > > $subscription->{expirationdate} = $expirationdate; >- next if $expirationdate !~ /\d{4}-\d{2}-\d{2}/; # next if not in ISO format. >+ next if !$expirationdate || $expirationdate !~ /\d{4}-\d{2}-\d{2}/; # next if not in ISO format. > next if $subscription->{closed}; > if ( Date_to_Days(split "-",$expirationdate) < Date_to_Days(split "-",$date) && >- Date_to_Days(split "-",$expirationdate) > Date_to_Days(&Today) ) { >+ ( $showexpiredtoday || (Date_to_Days(split "-",$expirationdate) > Date_to_Days(&Today)))) { > $subscription->{expirationdate}=format_date($subscription->{expirationdate}); > push @subscriptions_loop,$subscription; > } >@@ -90,6 +91,7 @@ if ($date) { > $template->param ( > title => $title, > issn => $issn, >+ showexpiredtoday => $showexpiredtoday, > numsubscription => scalar @subscriptions_loop, > date => format_date($date), > subscriptions_loop => \@subscriptions_loop, >-- >1.7.9.5 >
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 6968
:
5702
|
5703
|
7038
|
7435
|
30703
| 35314