Bug 11689: (follow-up) fix warnings generated when running Serials.t
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 27 Feb 2014 12:12:40 +0000 (13:12 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 18 Apr 2014 21:10:39 +0000 (21:10 +0000)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Serials.pm
t/db_dependent/Serials.t

index e9ac3d8..8a74e10 100644 (file)
@@ -2544,10 +2544,12 @@ sub GetNextDate {
         # irreg1;irreg2;irreg3
         # where irregX is the number of issue which will not be received
         # (the first issue takes the number 1, the 2nd the number 2 and so on)
-        my @irreg = split /;/, $subscription->{'irregularity'} ;
         my %irregularities;
-        foreach my $irregularity (@irreg) {
-            $irregularities{$irregularity} = 1;
+        if ( $subscription->{irregularity} ) {
+            my @irreg = split /;/, $subscription->{'irregularity'} ;
+            foreach my $irregularity (@irreg) {
+                $irregularities{$irregularity} = 1;
+            }
         }
 
         # Get the 'fictive' next issue number
index a363999..f1f5d9d 100644 (file)
@@ -41,7 +41,7 @@ my ($biblionumber, $biblioitemnumber) = AddBiblio(MARC::Record->new, '');
 my $budgetid;
 my $bpid = AddBudgetPeriod({
     budget_period_startdate => '01-01-2015',
-    budget_period_enddate   => '12-31-2015',
+    budget_period_enddate   => '31-12-2015',
     budget_description      => "budget desc"
 });
 
@@ -58,7 +58,13 @@ my $budget_id = AddBudget({
 my $frequency_id = AddSubscriptionFrequency({ description => "Test frequency 1" });
 my $pattern_id = AddSubscriptionNumberpattern({
     label => 'Test numberpattern 1',
-    numberingmethod => '{X}'
+    numberingmethod => '{X}',
+    label1 => q{},
+    add1 => 1,
+    every1 => 1,
+    every1 => 1,
+    numbering1 => 1,
+    whenmorethan1 => 1,
 });
 
 my $subscriptionid = NewSubscription(