Bugzilla – Attachment 61002 Details for
Bug 16116
Change of issue publication date doesn't reflect on the next issue generated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16116 - Fix problem change of issue publication date doesn't reflect on the next issue generated
Bug-16116---Fix-problem-change-of-issue-publicatio.patch (text/plain), 3.74 KB, created by
Bouzid Fergani
on 2017-03-10 19:10:05 UTC
(
hide
)
Description:
Bug 16116 - Fix problem change of issue publication date doesn't reflect on the next issue generated
Filename:
MIME Type:
Creator:
Bouzid Fergani
Created:
2017-03-10 19:10:05 UTC
Size:
3.74 KB
patch
obsolete
>From 8756b9d10f9ff9e2854e514d1d47c99a4ca2b3dc Mon Sep 17 00:00:00 2001 >From: Bouzid Fergani <bouzid.fergani@inlibro.com> >Date: Fri, 8 Apr 2016 16:58:18 -0400 >Subject: [PATCH] Bug 16116 - Fix problem change of issue publication date > doesn't reflect on the next issue generated > >Test plan : > >1. In Cataloging > New with Z39.50, look for issn = 1536-6596 (National Geographic) into the LCC z39.60 server. Add the record. > >2. Add a new subscription for National Geographic. Fill-in the form. >- use the default values of the first page >- for the second page : >First issue publication date = 10/01/2016 >Frequency = 1/month >Subscription lenght = 12 issues >Subscription start date = 01/01/2016 >Numbering pattern = Number >Begins with = 1 >- Save > >3. Receive the first issue. Change the status to "received". Note that the "Published on" date = 10/01/2016. This date goes to the "Date published" column in the serial collection page. > >4. The second issue is generated. Edit serial to receive the issue. > >5. Change the "Published on" date to 14/02/2016. Change the status to "received". Save. > >6. "Date published" for the next issue generated is : 14/03/2016. >--- > C4/Serials.pm | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 1e56b8e..507e341 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -2330,7 +2330,7 @@ sub _get_next_date_week { > my ($subscription, $freqdata, $year, $month, $day) = @_; > > my ($wkno, $yr) = Week_of_Year($year, $month, $day); >- my $fa_dow = Day_of_Week(split /-/, $subscription->{firstacquidate}); >+ my $fa_dow = Day_of_Week($year, $month, $day); > > if ($subscription->{countissuesperunit} + 1 > $freqdata->{issuesperunit}){ > $subscription->{countissuesperunit} = 1; >@@ -2355,18 +2355,17 @@ sub _get_next_date_month { > my ($subscription, $freqdata, $year, $month, $day) = @_; > > my $fa_day; >- (undef, undef, $fa_day) = split /-/, $subscription->{firstacquidate}; > > if ($subscription->{countissuesperunit} + 1 > $freqdata->{issuesperunit}){ > $subscription->{countissuesperunit} = 1; > ($year,$month,$day) = Add_Delta_YM($year,$month,$day, 0, > $freqdata->{unitsperissue}); > my $days_in_month = Days_in_Month($year, $month); >- $day = $fa_day <= $days_in_month ? $fa_day : $days_in_month; >+ $day = $day <= $days_in_month ? $day : $days_in_month; > } else { > # Try to guess the next day in month > my $days_in_month = Days_in_Month($year, $month); >- my $delta_days = int(($days_in_month - ($fa_day - 1)) / $freqdata->{issuesperunit}); >+ my $delta_days = int(($days_in_month - ($day - 1)) / $freqdata->{issuesperunit}); > ($year,$month,$day) = Add_Delta_Days($year, $month, $day, $delta_days); > $subscription->{countissuesperunit}++; > } >@@ -2382,13 +2381,12 @@ sub _get_next_date_year { > if ($subscription->{countissuesperunit} + 1 > $freqdata->{issuesperunit}){ > $subscription->{countissuesperunit} = 1; > ($year) = Add_Delta_YM($year,$month,$day, $freqdata->{"unitsperissue"},0); >- $month = $fa_month; > my $days_in_month = Days_in_Month($year, $month); >- $day = $fa_day <= $days_in_month ? $fa_day : $days_in_month; >+ $day = $day <= $days_in_month ? $day : $days_in_month; > } else { > # Try to guess the next day in year > my $days_in_year = Days_in_Year($year,12); #Sum the days of all the months of this year >- my $delta_days = int(($days_in_year - ($fa_day - 1)) / $freqdata->{issuesperunit}); >+ my $delta_days = int(($days_in_year - ($day - 1)) / $freqdata->{issuesperunit}); > ($year,$month,$day) = Add_Delta_Days($year, $month, $day, $delta_days); > $subscription->{countissuesperunit}++; > } >-- >1.9.1
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 16116
:
58265
|
58266
|
61002
|
62163