Bugzilla – Attachment 126381 Details for
Bug 28445
Use the task queue for the batch delete and update items tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28445: Fix encoding issue with the background job's report
Bug-28445-Fix-encoding-issue-with-the-background-j.patch (text/plain), 2.09 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-10-15 18:50:41 UTC
(
hide
)
Description:
Bug 28445: Fix encoding issue with the background job's report
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-10-15 18:50:41 UTC
Size:
2.09 KB
patch
obsolete
>From 1bdedb80b2c6939c37872a6d26fe7b7f703e8d71 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 27 Jul 2021 18:19:18 +0200 >Subject: [PATCH] Bug 28445: Fix encoding issue with the background job's > report > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/BackgroundJob.pm | 5 +++-- > Koha/BackgroundJob/BatchUpdateItem.pm | 3 ++- > 2 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm >index ab55376d33..c5cfd90899 100644 >--- a/Koha/BackgroundJob.pm >+++ b/Koha/BackgroundJob.pm >@@ -17,6 +17,7 @@ package Koha::BackgroundJob; > > use Modern::Perl; > use JSON qw( decode_json encode_json ); >+use Encode qw( encode_utf8 ); > use Carp qw( croak ); > use Net::Stomp; > use Try::Tiny qw( catch try ); >@@ -182,7 +183,7 @@ sub messages { > my ( $self ) = @_; > > my @messages; >- my $data_dump = decode_json $self->data; >+ my $data_dump = decode_json encode_utf8 $self->data; > if ( exists $data_dump->{messages} ) { > @messages = @{ $data_dump->{messages} }; > } >@@ -199,7 +200,7 @@ Report of the job. > sub report { > my ( $self ) = @_; > >- my $data_dump = decode_json $self->data; >+ my $data_dump = decode_json encode_utf8 $self->data; > return $data_dump->{report} || {}; > } > >diff --git a/Koha/BackgroundJob/BatchUpdateItem.pm b/Koha/BackgroundJob/BatchUpdateItem.pm >index 405e71456f..1dbc922682 100644 >--- a/Koha/BackgroundJob/BatchUpdateItem.pm >+++ b/Koha/BackgroundJob/BatchUpdateItem.pm >@@ -17,6 +17,7 @@ package Koha::BackgroundJob::BatchUpdateItem; > > use Modern::Perl; > use JSON qw( encode_json decode_json ); >+use Encode qw( encode_utf8 ); > use List::MoreUtils qw( uniq ); > use Try::Tiny; > >@@ -138,7 +139,7 @@ sub process { > if ( $_ =~ /Rollback failed/ ); # Rollback failed > }; > >- my $job_data = decode_json $job->data; >+ my $job_data = decode_json encode_utf8 $job->data; > $job_data->{report} = $report; > > $job->ended_on(dt_from_string)->data( encode_json $job_data); >-- >2.33.1
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 28445
:
121372
|
123221
|
123222
|
123223
|
123224
|
123225
|
123226
|
123227
|
123228
|
123229
|
123239
|
123240
|
125801
|
125802
|
125803
|
125804
|
125805
|
125808
|
125810
|
125811
|
125812
|
125817
|
125865
|
126046
|
126047
|
126136
|
126137
|
126138
|
126139
|
126140
|
126141
|
126142
|
126217
|
126218
|
126219
|
126223
|
126328
|
126329
|
126330
|
126331
|
126332
|
126333
|
126334
|
126335
|
126336
|
126337
|
126338
|
126339
|
126352
|
126353
|
126354
|
126355
|
126356
|
126357
|
126358
|
126359
|
126360
|
126361
|
126362
|
126363
|
126364
|
126365
|
126366
|
126367
|
126374
|
126375
|
126376
|
126377
|
126378
|
126379
|
126380
| 126381 |
126382
|
126383
|
126384
|
126385
|
126386
|
126387
|
126388
|
126389
|
127033
|
127037
|
127038
|
127039
|
128007
|
128008
|
128009