From f668ca7dae584dd71ae3bf454b4679a4253b5240 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 26 Jan 2015 08:39:17 -0500 Subject: [PATCH] Bug 12933: (QA followup) Rename GetOverdues to GetOverduesForPatron Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- C4/Members.pm | 4 ++-- members/print_overdues.pl | 4 ++-- t/db_dependent/Members/GetOverdues.t | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 55d4166f5a..9507b9f6cb 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -108,7 +108,7 @@ BEGIN { GetBorrowersWithEmail HasOverdues - GetOverdues + GetOverduesForPatron ); #Modify data @@ -2553,7 +2553,7 @@ WHERE borrowernumber = 0 AND DATEDIFF( NOW(), timestamp ) > ?|; return $cnt eq '0E0'? 0: $cnt; } -sub GetOverdues { +sub GetOverduesForPatron { my ( $borrowernumber ) = @_; my $sql = " diff --git a/members/print_overdues.pl b/members/print_overdues.pl index 526f615647..b63dec94be 100755 --- a/members/print_overdues.pl +++ b/members/print_overdues.pl @@ -24,7 +24,7 @@ use CGI; use C4::Context; use C4::Auth; use C4::Output; -use C4::Members qw(GetOverdues); +use C4::Members qw(GetOverduesForPatron); use C4::Overdues qw(parse_overdues_letter); my $input = new CGI; @@ -45,7 +45,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $borrowernumber = $input->param('borrowernumber'); my $branchcode = C4::Context->userenv->{'branch'}; -my $overdues = GetOverdues($borrowernumber); +my $overdues = GetOverduesForPatron($borrowernumber); my $letter = parse_overdues_letter( { diff --git a/t/db_dependent/Members/GetOverdues.t b/t/db_dependent/Members/GetOverdues.t index 62470caeca..f8a5c6beee 100644 --- a/t/db_dependent/Members/GetOverdues.t +++ b/t/db_dependent/Members/GetOverdues.t @@ -57,7 +57,7 @@ AddIssue( $borrower, '0101', DateTime->now->subtract( days => 1 ) ); AddIssue( $borrower, '0102', DateTime->now->subtract( days => 5 ) ); AddIssue( $borrower, '0103' ); -my $overdues = C4::Members::GetOverdues( $borrowernumber ); -is( @$overdues, 2, 'GetOverdues returns the correct number of elements' ); +my $overdues = C4::Members::GetOverduesForPatron( $borrowernumber ); +is( @$overdues, 2, 'GetOverduesForPatron returns the correct number of elements' ); is( $overdues->[0]->{itemnumber}, $itemnumber1, 'First overdue is correct' ); is( $overdues->[1]->{itemnumber}, $itemnumber2, 'Second overdue is correct' ); -- 2.39.5