https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889
--- Comment #9 from Martin Renvoize <[email protected]> --- 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. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
