Bugzilla – Attachment 92364 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: (follow-up) Ensuring publication date numbering patterns shows when receiving serials
Bug-22188-follow-up-Ensuring-publication-date-numb.patch (text/plain), 2.00 KB, created by
Aleisha Amohia
on 2019-08-19 21:58:43 UTC
(
hide
)
Description:
Bug 22188: (follow-up) Ensuring publication date numbering patterns shows when receiving serials
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2019-08-19 21:58:43 UTC
Size:
2.00 KB
patch
obsolete
>From 7e55d7dbe112519c62ff35dd0318d58689558414 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 19 Aug 2019 21:55:13 +0000 >Subject: [PATCH] Bug 22188: (follow-up) Ensuring publication date numbering > patterns shows when receiving serials > >This follow-up addresses the issue in Comment 21. > >To test: >1) Save a subscription with a regular number pattern and receive a few >issues >2) Edit the subscription to use publication date and save >3) Receive an issue >4) Notice the issue number under the 'Numbered' column has not updated >to reflect the publication date number pattern >5) Apply patch and refresh page >6) The issue number in the 'Numbered' column should now use the publication date >--- > C4/Serials.pm | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 9e60f44..f84eaad 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -217,6 +217,21 @@ sub GetSerialInformation { > $data->{'subscriptionexpired'} = HasSubscriptionExpired( $data->{'subscriptionid'} ) && $data->{'status'} == 1; > $data->{'abouttoexpire'} = abouttoexpire( $data->{'subscriptionid'} ); > $data->{cannotedit} = not can_edit_subscription( $data ); >+ >+ # dealing with number pattern that uses publication date >+ if ( !defined($data->{numberpattern}) && defined($data->{pubdatepatternformat}) ){ >+ my $pubdatepatternformat = $data->{pubdatepatternformat}; >+ if ( $pubdatepatternformat eq 'dmy' ){ >+ $data->{serialseq} = dt_from_string( $data->{publisheddate} )->strftime('%d %B %Y'); >+ } elsif ( $pubdatepatternformat eq 'mdy' ){ >+ $data->{serialseq} = dt_from_string( $data->{publisheddate} )->strftime('%B %d %Y'); >+ } elsif ( $pubdatepatternformat eq 'ydm' ){ >+ $data->{serialseq} = dt_from_string( $data->{publisheddate} )->strftime('%Y %d %B'); >+ } else { >+ $data->{serialseq} = dt_from_string( $data->{publisheddate} )->strftime('%Y %B %d'); >+ } >+ } >+ > return $data; > } > >-- >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 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