Bugzilla – Attachment 131800 Details for
Bug 30181
Koha::BackgroundJob->_derived_class returns an empty object
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30181: Make Koha::BackgroundJob->_derived_class return the right thing
Bug-30181-Make-KohaBackgroundJob-derivedclass-retu.patch (text/plain), 1.26 KB, created by
Andrew Fuerste-Henry
on 2022-03-16 14:32:50 UTC
(
hide
)
Description:
Bug 30181: Make Koha::BackgroundJob->_derived_class return the right thing
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2022-03-16 14:32:50 UTC
Size:
1.26 KB
patch
obsolete
>From 6cac97d9af4831e9ef30aea3c46592d54c059e57 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 25 Feb 2022 06:42:25 -0300 >Subject: [PATCH] Bug 30181: Make Koha::BackgroundJob->_derived_class return > the right thing > >This patch makes _derived_class rely on _new_from_dbic to generate a new >object with the right class, but based on the same DB row. Not an empty >one as it was before. This way we can remove some biolerplate that is >required now when writing background job classes. > >To test: >1. Apply the regression tests >2. Run: > $ kshell > k$ prove t/db_dependent/Koha/BackgroundJob.t >=> FAIL: Boo, tests fail >3. Apply this patch >4. Repeat 2 >=> SUCCESS: Tests pass! >5. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > Koha/BackgroundJob.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm >index 9f3be705e9..2a53702195 100644 >--- a/Koha/BackgroundJob.pm >+++ b/Koha/BackgroundJob.pm >@@ -240,7 +240,7 @@ sub _derived_class { > unless $class; > > eval "require $class"; >- return $class->new; >+ return $class->_new_from_dbic( $self->_result ); > } > > =head3 type_to_class_mapping >-- >2.30.2
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 30181
:
131105
|
131106
|
131107
|
131322
|
131323
|
131324
|
131325
|
131799
|
131800
|
131801
|
131802
|
131845
|
131846
|
131847
|
131848