From 9eb971ca6b74506da6cd28ae44c490c97add0779 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 19 Feb 2020 11:14:53 +0100 Subject: [PATCH] Bug 22417: Fix borrowernumber values Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Cook Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart --- Koha/BackgroundJob.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm index bc22b19390..3224b5d486 100644 --- a/Koha/BackgroundJob.pm +++ b/Koha/BackgroundJob.pm @@ -31,6 +31,7 @@ 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 $json_args = encode_json $job_args; $self->set({ status => 'new', @@ -38,7 +39,7 @@ sub enqueue { size => $job_size, data => $json_args, enqueued_on => dt_from_string, - borrowernumber => C4::Context->userenv->{id}, # FIXME Handle non GUI calls + borrowernumber => $borrowernumber, })->store; my $job_id = $self->id; -- 2.39.5