[Koha-bugs] [Bug 30889] Background jobs lead to wrong/missing info in logs
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jun 10 13:07:23 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889
--- Comment #9 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Comment on attachment 135759
--> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135759
Bug 30889: Set userenv for background jobs
Review of attachment 135759:
--> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=30889&attachment=135759)
-----------------------------------------------------------------
::: misc/background_jobs_worker.pl
@@ +126,5 @@
> + C4::Context->_new_userenv(-1);
> + C4::Context->set_userenv(
> + $patron->borrowernumber, $patron->userid,
> + $patron->cardnumber, $patron->firstname,
> + $patron->surname, $patron->branchcode,
This feels a little funky.. isn't the branchcode meant to reflect the logged in
branch... i.e. 'where that patron triggered the job'.. so that may not be the
patrons home branch at all.
This is not a trivial thing to resolve correctly though, you're right.
@@ +131,5 @@
> + $patron->library->branchname, $patron->flags
> + );
> + $job->process( $args );
> + C4::Context->_unset_userenv(-1);
> + } ese {
else
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list