Bugzilla – Attachment 148079 Details for
Bug 30943
Make background job classes use helpers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30943: Adjust CreateEHoldingsFromBiblios
Bug-30943-Adjust-CreateEHoldingsFromBiblios.patch (text/plain), 1.77 KB, created by
Kyle M Hall
on 2023-03-10 15:48:46 UTC
(
hide
)
Description:
Bug 30943: Adjust CreateEHoldingsFromBiblios
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2023-03-10 15:48:46 UTC
Size:
1.77 KB
patch
obsolete
>From 3b0f2aaf774542f278fc2a04ade00e835a7110a4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 1 Feb 2023 16:15:11 +0100 >Subject: [PATCH] Bug 30943: Adjust CreateEHoldingsFromBiblios > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../CreateEHoldingsFromBiblios.pm | 21 +++++++------------ > 1 file changed, 7 insertions(+), 14 deletions(-) > >diff --git a/Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm b/Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm >index c48181f34f..807b85fdab 100644 >--- a/Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm >+++ b/Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm >@@ -20,7 +20,6 @@ use JSON qw( decode_json encode_json ); > use Try::Tiny; > > use Koha::Biblios; >-use Koha::DateUtils qw( dt_from_string ); > use Koha::ERM::EHoldings::Titles; > use Koha::ERM::EHoldings::Resources; > >@@ -61,11 +60,7 @@ sub process { > return; > } > >- my $job_progress = 0; >- $self->started_on(dt_from_string) >- ->progress($job_progress) >- ->status('started') >- ->store; >+ $self->start; > > my @messages; > my @record_ids = @{ $args->{record_ids} }; >@@ -181,17 +176,15 @@ sub process { > error => $_, > }; > }; >- $self->progress( ++$job_progress )->store; >+ $self->step; > } > >- my $job_data = decode_json $self->data; >- $job_data->{messages} = \@messages; >- $job_data->{report} = $report; > >- $self->ended_on(dt_from_string) >- ->data(encode_json $job_data); >- $self->status('finished') if $self->status ne 'cancelled'; >- $self->store; >+ my $data = $self->decoded_data; >+ $data->{messages} = \@messages; >+ $data->{report} = $report; >+ >+ $self->finish( $data ); > } > > =head3 enqueue >-- >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 30943
:
140329
|
144340
|
145957
|
145958
|
147765
|
147766
|
147767
|
148078
| 148079 |
148080