Bugzilla – Attachment 138465 Details for
Bug 30612
Add account_lines method to Koha::[Old::]Checkout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30612: Rename other occurrences
Bug-30612-Rename-other-occurrences.patch (text/plain), 4.21 KB, created by
Jonathan Druart
on 2022-08-01 12:45:51 UTC
(
hide
)
Description:
Bug 30612: Rename other occurrences
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-08-01 12:45:51 UTC
Size:
4.21 KB
patch
obsolete
>From 4d97a04d30b0c769bcb6a81ed8f3e4c48c6d4ea0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 1 Aug 2022 14:44:04 +0200 >Subject: [PATCH] Bug 30612: Rename other occurrences > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/Checkout.pm | 4 ++-- > Koha/Old/Checkout.pm | 4 ++-- > Koha/Schema/Result/Issue.pm | 2 +- > Koha/Schema/Result/OldIssue.pm | 2 +- > t/db_dependent/Koha/Account/Line.t | 2 +- > t/db_dependent/Koha/Checkouts.t | 10 +++++----- > 6 files changed, 12 insertions(+), 12 deletions(-) > >diff --git a/Koha/Checkout.pm b/Koha/Checkout.pm >index af2bb8bd074..178a8c0da4a 100644 >--- a/Koha/Checkout.pm >+++ b/Koha/Checkout.pm >@@ -89,8 +89,8 @@ Return the checked out account_lines > > sub account_lines { > my ( $self ) = @_; >- my $accountlines_rs = $self->_result->accountlines; >- return Koha::Account::Lines->_new_from_dbic( $accountlines_rs ); >+ my $account_lines_rs = $self->_result->account_lines; >+ return Koha::Account::Lines->_new_from_dbic( $account_lines_rs ); > } > > =head3 library >diff --git a/Koha/Old/Checkout.pm b/Koha/Old/Checkout.pm >index 6ae20e275fd..49a77654858 100644 >--- a/Koha/Old/Checkout.pm >+++ b/Koha/Old/Checkout.pm >@@ -55,8 +55,8 @@ Return the checked out account_lines > > sub account_lines { > my ( $self ) = @_; >- my $accountlines_rs = $self->_result->accountlines; >- return Koha::Account::Lines->_new_from_dbic( $accountlines_rs ); >+ my $account_lines_rs = $self->_result->account_lines; >+ return Koha::Account::Lines->_new_from_dbic( $account_lines_rs ); > } > > =head3 library >diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm >index 7ad235ddf33..9b727a04cc0 100644 >--- a/Koha/Schema/Result/Issue.pm >+++ b/Koha/Schema/Result/Issue.pm >@@ -404,7 +404,7 @@ __PACKAGE__->might_have( > ); > > __PACKAGE__->has_many( >- "accountlines", >+ "account_lines", > "Koha::Schema::Result::Accountline", > { "foreign.issue_id" => "self.issue_id" }, > { cascade_copy => 0, cascade_delete => 0 }, >diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm >index 1ae3e2f87a7..50ef4a82e03 100644 >--- a/Koha/Schema/Result/OldIssue.pm >+++ b/Koha/Schema/Result/OldIssue.pm >@@ -367,7 +367,7 @@ Related object: L<Koha::Schema::Result::ReturnClaim> > =cut > > __PACKAGE__->has_many( >- "accountlines", >+ "account_lines", > "Koha::Schema::Result::Accountline", > { "foreign.issue_id" => "self.issue_id" }, > { cascade_copy => 0, cascade_delete => 0 }, >diff --git a/t/db_dependent/Koha/Account/Line.t b/t/db_dependent/Koha/Account/Line.t >index 71981b4b1ef..9d29dad3e31 100755 >--- a/t/db_dependent/Koha/Account/Line.t >+++ b/t/db_dependent/Koha/Account/Line.t >@@ -347,7 +347,7 @@ subtest 'apply() tests' => sub { > )->store(); > > my $a = $checkout->account_lines->next; >- is( $a->id, $accountline->id, "Koha::Checkout::accountlines returns the related acountline" ); >+ is( $a->id, $accountline->id, "Koha::Checkout::account_lines returns the related acountline" ); > > # Enable renewing upon fine payment > t::lib::Mocks::mock_preference( 'RenewAccruingItemWhenPaid', 1 ); >diff --git a/t/db_dependent/Koha/Checkouts.t b/t/db_dependent/Koha/Checkouts.t >index 232a576d1a9..43739041423 100755 >--- a/t/db_dependent/Koha/Checkouts.t >+++ b/t/db_dependent/Koha/Checkouts.t >@@ -128,18 +128,18 @@ subtest 'account_lines' => sub { > } > )->store(); > >- my $accountlines = $retrieved_checkout_1->account_lines; >- is( ref($accountlines), 'Koha::Account::Lines', >- 'Koha::Checkout->accountlines should return a Koha::Item' ); >+ my $account_lines = $retrieved_checkout_1->account_lines; >+ is( ref($account_lines), 'Koha::Account::Lines', >+ 'Koha::Checkout->account_lines should return a Koha::Account::Lines' ); > >- my $line = $accountlines->next; >+ my $line = $account_lines->next; > is( ref($line), 'Koha::Account::Line', > 'next returns a Koha::Account::Line' ); > > is( > $accountline->id, > $line->id, >- 'Koha::Checkout->accountlines should return the correct accountlines' >+ 'Koha::Checkout->account_lines should return the correct account_lines' > ); > }; > >-- >2.25.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 30612
:
133841
|
134567
|
135827
|
135828
|
135829
|
138461
|
138462
|
138463
|
138464
| 138465