Bugzilla – Attachment 58420 Details for
Bug 17584
Add the Koha::Patron->checkouts method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17584 [QA Followup] - Rename Koha::Patron::get_checkouts to Koha::Patron::checkouts
Bug-17584-QA-Followup---Rename-KohaPatrongetchecko.patch (text/plain), 3.22 KB, created by
Kyle M Hall (khall)
on 2016-12-23 14:14:11 UTC
(
hide
)
Description:
Bug 17584 [QA Followup] - Rename Koha::Patron::get_checkouts to Koha::Patron::checkouts
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-12-23 14:14:11 UTC
Size:
3.22 KB
patch
obsolete
>From b9a0d2e681ff0cb3f7e5177df55352870c83f286 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 23 Dec 2016 14:07:42 +0000 >Subject: [PATCH] Bug 17584 [QA Followup] - Rename Koha::Patron::get_checkouts > to Koha::Patron::checkouts > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Patron.pm | 8 ++++---- > t/db_dependent/Koha/Patrons.t | 14 +++++++------- > 2 files changed, 11 insertions(+), 11 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index e32173a..5b9630a 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -501,13 +501,13 @@ sub add_enrolment_fee_if_needed { > return $enrolment_fee || 0; > } > >-=head3 get_checkouts >+=head3 checkouts > >-my $issues = $patron->get_checkouts >+my $issues = $patron->checkouts > > =cut > >-sub get_checkouts { >+sub checkouts { > my ($self) = @_; > my $issues = $self->_result->issues; > return Koha::Checkouts->_new_from_dbic( $issues ); >@@ -524,7 +524,7 @@ Return the overdued items > sub get_overdues { > my ($self) = @_; > my $dtf = Koha::Database->new->schema->storage->datetime_parser; >- return $self->get_checkouts->search( >+ return $self->checkouts->search( > { > 'me.date_due' => { '<' => $dtf->format_datetime(dt_from_string) }, > }, >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index a837a44..82b6b33 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -412,7 +412,7 @@ subtest 'add_enrolment_fee_if_needed' => sub { > $patron->delete; > }; > >-subtest 'get_checkouts + get_overdues' => sub { >+subtest 'checkouts + get_overdues' => sub { > plan tests => 8; > > my $library = $builder->build( { source => 'Branch' } ); >@@ -456,9 +456,9 @@ subtest 'get_checkouts + get_overdues' => sub { > ); > > $patron = Koha::Patrons->find( $patron->{borrowernumber} ); >- my $checkouts = $patron->get_checkouts; >- is( $checkouts->count, 0, 'get_checkouts should not return any issues for that patron' ); >- is( ref($checkouts), 'Koha::Checkouts', 'get_checkouts should return a Koha::Checkouts object' ); >+ my $checkouts = $patron->checkouts; >+ is( $checkouts->count, 0, 'checkouts should not return any issues for that patron' ); >+ is( ref($checkouts), 'Koha::Checkouts', 'checkouts should return a Koha::Checkouts object' ); > > # Not sure how this is useful, but AddIssue pass this variable to different other subroutines > $patron = GetMember( borrowernumber => $patron->borrowernumber ); >@@ -471,9 +471,9 @@ subtest 'get_checkouts + get_overdues' => sub { > AddIssue( $patron, $item_3->{barcode} ); > > $patron = Koha::Patrons->find( $patron->{borrowernumber} ); >- $checkouts = $patron->get_checkouts; >- is( $checkouts->count, 3, 'get_checkouts should return 3 issues for that patron' ); >- is( ref($checkouts), 'Koha::Checkouts', 'get_checkouts should return a Koha::Checkouts object' ); >+ $checkouts = $patron->checkouts; >+ is( $checkouts->count, 3, 'checkouts should return 3 issues for that patron' ); >+ is( ref($checkouts), 'Koha::Checkouts', 'checkouts should return a Koha::Checkouts object' ); > > my $overdues = $patron->get_overdues; > is( $overdues->count, 2, 'Patron should have 2 overdues'); >-- >2.1.4
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 17584
:
57331
|
57365
|
57971
|
58295
|
58419
| 58420