From 2b58f18f64fd75aab037786f77c6c235265a7122 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 18 Apr 2024 13:10:16 +0000 Subject: [PATCH] Bug 35646: (follow-up) Correct firstaquidate type Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- C4/Serials.pm | 2 +- t/db_dependent/Serials.t | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 6211779d43..dccfa6c155 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -956,7 +956,7 @@ sub GetSeq { $newlastvalue3 = _numeration($newlastvalue3, $pattern->{numbering3}, $locale) if ($pattern->{numbering3}); # reset counter if needed. $calculated =~ s/\{Z\}/$newlastvalue3/g; - my $dt = dt_from_string( $subscription->{firstaquidate} ); + my $dt = dt_from_string( $subscription->{firstacquidate} ); $calculated =~ s/\{Month\}/$dt->month/eg; $calculated =~ s/\{MonthName\}/$dt->month_name/eg; $calculated =~ s/\{Year\}/$dt->year/eg; diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t index 8f91362696..1b748883bb 100755 --- a/t/db_dependent/Serials.t +++ b/t/db_dependent/Serials.t @@ -560,7 +560,7 @@ subtest "test numbering pattern with dates in GetSeq GetNextSeq" => sub { skip_serialseq => 0, irregularity => '', locale => 'C', # locale set to 'C' to ensure we'll have english strings - firstaquidate => '1970-11-01', + firstacquidate => '1970-11-01', }; $pattern = { numberingmethod => '{Year} {Day} {DayName} {Month} {MonthName}', @@ -568,7 +568,7 @@ subtest "test numbering pattern with dates in GetSeq GetNextSeq" => sub { my $numbering = GetSeq( $subscription, $pattern ); is( $numbering, '1970 1 Sunday 11 November', 'GetSeq correctly calculates numbering from first aqui date' ); - $subscription->{firstaquidate} = '2024-02-29'; + $subscription->{firstacquidate} = '2024-02-29'; $numbering = GetSeq( $subscription, $pattern ); is( @@ -588,7 +588,6 @@ subtest "test numbering pattern with dates in GetSeq GetNextSeq" => sub { }; - subtest "_numeration" => sub { plan tests => 6; -- 2.39.5