Bugzilla – Attachment 157015 Details for
Bug 22188
Use publication date as numbering pattern
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22188: Additional fixes
Bug-22188-Additional-fixes.patch (text/plain), 3.30 KB, created by
Aleisha Amohia
on 2023-10-13 02:06:21 UTC
(
hide
)
Description:
Bug 22188: Additional fixes
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-10-13 02:06:21 UTC
Size:
3.30 KB
patch
obsolete
>From d4bb18d14998602d7299a9746ff7a5d43b97a6d3 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Fri, 17 Sep 2021 02:55:18 +1200 >Subject: [PATCH] Bug 22188: Additional fixes > >--- > C4/Serials.pm | 3 ++- > koha-tmpl/intranet-tmpl/prog/js/subscription-add.js | 2 +- > serials/serials-collection.pl | 13 +++++++++++++ > serials/showpredictionpattern.pl | 2 +- > 4 files changed, 17 insertions(+), 3 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index f1e9a03940b..f8fe0af951e 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -340,7 +340,8 @@ sub GetFullSubscription { > aqbooksellers.name as aqbooksellername, > biblio.title as bibliotitle, > subscription.branchcode AS branchcode, >- subscription.subscriptionid AS subscriptionid >+ subscription.subscriptionid AS subscriptionid, >+ subscription.pubdatepatternformat AS dateformat > FROM serial > LEFT JOIN subscription ON > (serial.subscriptionid=subscription.subscriptionid ) >diff --git a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >index 4d46a4bf132..989b2eb4332 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >@@ -353,7 +353,7 @@ function testPredictionPattern() { > for(i in ajaxParams) { > var param = ajaxParams[i]; > var value = $("#"+param).val(); >- if(value.length > 0) >+ if(value && value.length > 0) > ajaxData[param] = value; > } > >diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl >index 78ba4e49489..55f799a3c2e 100755 >--- a/serials/serials-collection.pl >+++ b/serials/serials-collection.pl >@@ -180,6 +180,19 @@ if (@subscriptionid){ > > $template->param(closed => $closed); > $subscriptions=PrepareSerialsData(\@subscriptioninformation); >+ foreach (@{$subscriptions->[0]->{serials}}) { >+ if ( $_->{serialseq} eq "pubdate" ) { >+ if ( $_->{dateformat} eq 'dmy' ){ >+ $_->{serialseq} = dt_from_string( $_->{publisheddate} )->strftime('%d %B %Y'); >+ } elsif ( $_->{dateformat} eq 'mdy' ){ >+ $_->{serialseq} = dt_from_string( $_->{publisheddate} )->strftime('%B %d %Y'); >+ } elsif ( $_->{dateformat} eq 'ydm' ){ >+ $_->{serialseq} = dt_from_string( $_->{publisheddate} )->strftime('%Y %d %B'); >+ } else { >+ $_->{serialseq} = dt_from_string( $_->{publisheddate} )->strftime('%Y %B %d'); >+ } >+ } >+ } > $subscriptioncount = CountSubscriptionFromBiblionumber($subscriptiondescs->[0]{'biblionumber'}); > } else { > $subscriptiondescs = GetSubscriptionsFromBiblionumber($biblionumber); >diff --git a/serials/showpredictionpattern.pl b/serials/showpredictionpattern.pl >index 86fea33264b..f7be261f3d6 100755 >--- a/serials/showpredictionpattern.pl >+++ b/serials/showpredictionpattern.pl >@@ -121,7 +121,7 @@ if(defined $subscriptionid) { > my @predictions_loop; > my ($calculated) = GetSeq(\%subscription, \%pattern); > >-my $dateformat = scalar $input->param('date_format'); >+my $dateformat = scalar $input->param('date_format') // ''; > > if ($calculated eq "pubdate"){ > if ( $dateformat eq 'dmy' ){ >-- >2.30.2
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 22188
:
84314
|
85415
|
85540
|
85541
|
85542
|
86419
|
87433
|
88830
|
91761
|
91762
|
92185
|
92186
|
92345
|
92364
|
94290
|
94291
|
156886
|
156887
|
156888
|
156889
|
156890
|
156891
|
157009
|
157010
|
157011
|
157012
|
157013
|
157014
| 157015 |
157179
|
158638
|
158659