Bugzilla – Attachment 61960 Details for
Bug 18395
Wrong article request methods in Koha::Patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18395: (bug 14610 followup) Remove article requests methods from Koha::Patrons
Bug-18395-bug-14610-followup-Remove-article-reques.patch (text/plain), 3.21 KB, created by
Marcel de Rooy
on 2017-04-07 09:04:14 UTC
(
hide
)
Description:
Bug 18395: (bug 14610 followup) Remove article requests methods from Koha::Patrons
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-04-07 09:04:14 UTC
Size:
3.21 KB
patch
obsolete
>From 260275868e979fe08f114f775c0fb92ee25fdd1d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 4 Apr 2017 22:30:19 -0300 >Subject: [PATCH] Bug 18395: (bug 14610 followup) Remove article requests > methods from Koha::Patrons >MIME-Version: 1.0 >Content-Type: text/plain; charset=utf-8 >Content-Transfer-Encoding: 8bit >Content-Type: text/plain; charset=utf-8 > >There is something very wrong with the new subroutines, they have been added to both Koha::Patron and Koha::Patrons: > >% git grep 'sub article_request' Koha/Patron*.pm >Koha/Patron.pm:sub article_requests { >Koha/Patron.pm:sub article_requests_current { >Koha/Patron.pm:sub article_requests_finished { >Koha/Patrons.pm:sub article_requests { >Koha/Patrons.pm:sub article_requests_current { >Koha/Patrons.pm:sub article_requests_finished { > >The ones in Koha::Patrons are wrong > >Test plan: > prove t/db_dependent/ArticleRequests.t >should still return green > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Patrons.pm | 67 --------------------------------------------------------- > 1 file changed, 67 deletions(-) > >diff --git a/Koha/Patrons.pm b/Koha/Patrons.pm >index 6548f02..b8aebeb 100644 >--- a/Koha/Patrons.pm >+++ b/Koha/Patrons.pm >@@ -115,73 +115,6 @@ sub guarantor { > return Koha::Patrons->find( $self->guarantorid() ); > } > >-=head3 article_requests >- >-my @requests = $borrower->article_requests(); >-my $requests = $borrower->article_requests(); >- >-Returns either a list of ArticleRequests objects, >-or an ArtitleRequests object, depending on the >-calling context. >- >-=cut >- >-sub article_requests { >- my ( $self ) = @_; >- >- $self->{_article_requests} ||= Koha::ArticleRequests->search({ borrowernumber => $self->borrowernumber() }); >- >- return $self->{_article_requests}; >-} >- >-=head3 article_requests_current >- >-my @requests = $patron->article_requests_current >- >-Returns the article requests associated with this patron that are incomplete >- >-=cut >- >-sub article_requests_current { >- my ( $self ) = @_; >- >- $self->{_article_requests_current} ||= Koha::ArticleRequests->search( >- { >- borrowernumber => $self->id(), >- -or => [ >- { status => Koha::ArticleRequest::Status::Pending }, >- { status => Koha::ArticleRequest::Status::Processing } >- ] >- } >- ); >- >- return $self->{_article_requests_current}; >-} >- >-=head3 article_requests_finished >- >-my @requests = $biblio->article_requests_finished >- >-Returns the article requests associated with this patron that are completed >- >-=cut >- >-sub article_requests_finished { >- my ( $self, $borrower ) = @_; >- >- $self->{_article_requests_finished} ||= Koha::ArticleRequests->search( >- { >- borrowernumber => $self->id(), >- -or => [ >- { status => Koha::ArticleRequest::Status::Completed }, >- { status => Koha::ArticleRequest::Status::Canceled } >- ] >- } >- ); >- >- return $self->{_article_requests_finished}; >-} >- > =head3 search_patrons_to_anonymise > > my $patrons = Koha::Patrons->search_patrons_to_anonymise( { before => $older_than_date, [ library => $library ] } ); >-- >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 18395
:
61939
|
61943
| 61960