Bugzilla – Attachment 125780 Details for
Bug 29182
ArticleRequest status changing methods calling SUPER::store
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29182: Make sure methods call the overloaded ->store
Bug-29182-Make-sure-methods-call-the-overloaded--s.patch (text/plain), 1.57 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-10-06 12:04:18 UTC
(
hide
)
Description:
Bug 29182: Make sure methods call the overloaded ->store
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-10-06 12:04:18 UTC
Size:
1.57 KB
patch
obsolete
>From 4db7c5f1d3ec1be2a03bb2822ec67216e0771736 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 6 Oct 2021 09:01:13 -0300 >Subject: [PATCH] Bug 29182: Make sure methods call the overloaded ->store > >This patch addresses the issue of `request()` and `set_pending()` >calling $self->SUPER::store instead of the overloaded one. > >This prevents created_on being set. > >To test: >1. Apply the regression tests patch >2. Run: > $ kshell > k$ prove t/db_dependent/Koha/ArticleRequest.t >=> FAIL: created_on is not set on two methods >3. Apply this patch >4. Repeat 2 >=> SUCCESS: created_on is now set! >5. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/ArticleRequest.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/ArticleRequest.pm b/Koha/ArticleRequest.pm >index e03af23173..2d7f5596da 100644 >--- a/Koha/ArticleRequest.pm >+++ b/Koha/ArticleRequest.pm >@@ -57,7 +57,7 @@ sub request { > ) unless $self->borrower->can_request_article; > > $self->status(Koha::ArticleRequest::Status::Requested); >- $self->SUPER::store(); >+ $self->store(); > $self->notify(); > return $self; > } >@@ -74,7 +74,7 @@ sub set_pending { > my ($self) = @_; > > $self->status(Koha::ArticleRequest::Status::Pending); >- $self->SUPER::store(); >+ $self->store(); > $self->notify(); > return $self; > } >@@ -204,7 +204,7 @@ sub store { > return $self->SUPER::store; > } else { > $self->created_on( dt_from_string() ); >- return $self->request; >+ return $self->SUPER::store; > } > } > >-- >2.32.0
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 29182
:
125779
|
125780
|
125783
|
125784
|
125785
|
125786
|
125869
|
125871
|
125872
|
125873
|
125874