Bugzilla – Attachment 132611 Details for
Bug 27344
Implement Elastic's update_index_background using Koha::BackgroundJob
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27344: Set job.borrowernumber to undef if enqueued from cli script
Bug-27344-Set-jobborrowernumber-to-undef-if-enqueu.patch (text/plain), 996 bytes, created by
Martin Renvoize (ashimema)
on 2022-03-30 13:37:01 UTC
(
hide
)
Description:
Bug 27344: Set job.borrowernumber to undef if enqueued from cli script
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-03-30 13:37:01 UTC
Size:
996 bytes
patch
obsolete
>From 73dfec8a276e15e611a28f8c59c8b8eb69ac7af8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 3 Feb 2021 13:40:21 +0100 >Subject: [PATCH] Bug 27344: Set job.borrowernumber to undef if enqueued from > cli script > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/BackgroundJob.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm >index d2422a4bac..e1a0e8313b 100644 >--- a/Koha/BackgroundJob.pm >+++ b/Koha/BackgroundJob.pm >@@ -98,7 +98,9 @@ sub enqueue { > my $job_size = $params->{job_size}; > my $job_args = $params->{job_args}; > >- my $borrowernumber = C4::Context->userenv->{number}; # FIXME Handle non GUI calls >+ my $borrowernumber = C4::Context->userenv >+ ? C4::Context->userenv->{number} >+ : undef; > my $json_args = encode_json $job_args; > my $job_id; > $self->_result->result_source->schema->txn_do( >-- >2.20.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 27344
:
114877
|
116252
|
116931
|
132444
|
132445
|
132446
|
132586
|
132609
|
132610
|
132611
|
132612
|
132613
|
132645
|
132646
|
132794
|
132795
|
132796
|
132797
|
132798
|
132843
|
132844
|
132845
|
132969
|
132970
|
132994
|
132995
|
133033
|
134406
|
134407
|
134408
|
134409
|
134410
|
134411
|
134412
|
134413