[Bug 30889] New: Batch edited items shows wrong info in logs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Bug ID: 30889 Summary: Batch edited items shows wrong info in logs Change sponsored?: --- Product: Koha Version: 21.11 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: magnus@libriotech.no QA Contact: testopia@bugs.koha-community.org To reproduce: - Make sure CataloguingLog is turned on - Edit some items with the "Batch item modification" tool, for example two items connected to the same record - Look at the "Cataloging" log - Note that Librarian = 0 and Interface = OPAC for those items you just edited -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #1 from Magnus Enger <magnus@libriotech.no> --- Tested on 21.11.05 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #2 from Magnus Enger <magnus@libriotech.no> --- Hm, it looks like this is something we are aware of. From C4::Log: --- 8< --- =item logaction &logaction($modulename, $actionname, $objectnumber, $infos, $interface); Adds a record into action_logs table to report the different changes upon the database. Each log entry includes the number of the user currently logged in. For batch jobs, which operate without authenticating a user and setting up a session, the user number is set to 0, which is the same as the superlibrarian's number. =cut #' sub logaction { my ($modulename, $actionname, $objectnumber, $infos, $interface)=@_; # Get ID of logged in user. if called from a batch job, # no user session exists and C4::Context->userenv() returns # the scalar '0'. my $userenv = C4::Context->userenv(); my $usernumber = (ref($userenv) eq 'HASH') ? $userenv->{'number'} : 0; $usernumber ||= 0; $interface //= C4::Context->interface; --- 8< --- But we do have background_jobs.borrowernumber, so couldn't it be possible to use that to record the borrowernumber in the action logs? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Batch edited items shows |Background jobs lead to |wrong info in logs |wrong/missing info in logs -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 135759 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135759&action=edit Bug 30889: Set userenv for background jobs We need to set the userenv when we process the jobs. It is useful for stats (at least) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 135760 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135760&action=edit Bug 30889: Set interface to 'intranet' Is that correct? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com CC| |jonathan.druart+koha@gmail. | |com, | |martin.renvoize@ptfs-europe | |.com, tomascohen@gmail.com Status|NEW |In Discussion Keywords| |rel_21_11_candidate, | |rel_22_05_candidate Version|21.11 |unspecified --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Martin, Tomas, do you have opinion on how to fix this issue correctly? The first patch is ugly but could work for backport. I am not sure about the second patch, but certainly the easier and secure for now (and we improve later?) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #6 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #4)
Created attachment 135760 [details] [review] Bug 30889: Set interface to 'intranet'
Is that correct?
It looks like 'interface' is a VARCHAR(30). I wonder if it's time to add an interface beyond 'intranet' and 'opac'. Or if we care where the job comes from, I suppose that detail would need to be passed with the job... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- 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 @@ +132,5 @@
+ ); + $job->process( $args ); + C4::Context->_unset_userenv(-1); + } ese { + $job->process( $args );
I don't think that you need to repeat $job->process($args). You can just do the patron check and userenv around it? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #5)
Martin, Tomas, do you have opinion on how to fix this issue correctly?
The first patch is ugly but could work for backport.
I think what you've done might be the only viable option at this point. Koha relies a fair bit on global variables and (pseudo-)sessions. I think you might not need to unset the userenv due to the forking but I would have to double-check the code.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #9 from Martin Renvoize <martin.renvoize@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm wondering if we ought to record some of this at enqueue time in the queue table itself... then set the userenv from that? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- The more I contemplate this the more I think we should add a 'context' field (probably replacing the 'borrowernumber' field) to the background_jobs table and populate it with a serialised context from the enqueue method and then use that context to set a context for the job to run in. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #11)
The more I contemplate this the more I think we should add a 'context' field (probably replacing the 'borrowernumber' field) to the background_jobs table and populate it with a serialised context from the enqueue method and then use that context to set a context for the job to run in.
I support this option. Context needs to be set on enqueing the job. The caller knows the context. The background job class should be able to set userenv correctly when starting the job. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135759|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135932 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135932&action=edit Bug 30889: Set userenv for background jobs We need to set the userenv when we process the jobs. It is useful for stats (at least) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135760|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135933 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135933&action=edit Bug 30889: Set interface to 'intranet' Is that correct? Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135934 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135934&action=edit Bug 30889: (follow-up) Add context field to background_jobs This patch adds a new 'context' field to the background_jobs table to record the context in which the job was queued. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135935 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135935&action=edit Bug 30889: (follow-up) Record and use context in background_jobs This patch records the current context to the background_jobs table at enqueue time and then uses that record to set the context at process time. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135936 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135936&action=edit Bug 30889: DBIC Schema -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- So we could probably squash this as it's basically an alternative.. but I based it on top of Jonathans work in case he wanted recognition for working on it already :) I've not tested it deeply as yet, but I believe this approach should work and be a little more correct. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart+koha@gmail. |martin.renvoize@ptfs-europe |com |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #19 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- + my $job_context = $params->{job_context} // C4::Context->userenv; Shouldn't we force that? Either C4::Context->userenv or job_context is passed. Otherwise explode? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #20 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Martin Renvoize from comment #18)
So we could probably squash this as it's basically an alternative.. but I based it on top of Jonathans work in case he wanted recognition for working on it already :)
You can squash, I don't mind! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #21 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Jonathan Druart from comment #19)
+ my $job_context = $params->{job_context} // C4::Context->userenv;
Shouldn't we force that? Either C4::Context->userenv or job_context is passed. Otherwise explode?
Probably not a bad idea. I can add that on Monday. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #22 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Also, as in this version I change the base class I should probably add a unit test for it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135932|0 |1 is obsolete| | Attachment #135933|0 |1 is obsolete| | Attachment #135934|0 |1 is obsolete| | Attachment #135935|0 |1 is obsolete| | Attachment #135936|0 |1 is obsolete| | --- Comment #23 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 136294 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136294&action=edit Bug 30889: Set userenv for background jobs We need to set the userenv when we process the jobs. It is useful for stats (at least) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #24 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 136295 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136295&action=edit Bug 30889: Set interface to 'intranet' Is that correct? Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #25 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 136296 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136296&action=edit Bug 30889: (follow-up) Add context field to background_jobs This patch adds a new 'context' field to the background_jobs table to record the context in which the job was queued. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #26 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 136297 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136297&action=edit Bug 30889: (follow-up) Record and use context in background_jobs This patch records the current context to the background_jobs table at enqueue time and then uses that record to set the context at process time. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #27 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 136298 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136298&action=edit Bug 30889: DBIC Schema Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #28 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 136299 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136299&action=edit Bug 30889: Fix atomic update permissions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #29 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 136375 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136375&action=edit Bug 30889: Unit tests This patch adds a unit test for the 'enqueue' part of the bug. We check that the mocked context (and interface) are recorded with the job enqueue in the new 'context' field. We do not yet test the 'process' end, where we then read the context out and set the job Context from it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #30 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- First unit tests added.. not entirely sure how to write the test for 'process' at this point. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #31 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 136376 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136376&action=edit Bug 30889: Unit tests - process This patch adds corresponding unit tests for the 'process' side of this patchset. We check that the Context for the job to run in as set from the Job context recorded at enqueue time. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #32 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I wrapped my head around it :) Ready for QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27783 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27783 [Bug 27783] Introduce background job queues -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30654 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136294|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136295|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136296|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136297|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136298|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136299|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136375|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136376|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #33 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136784 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136784&action=edit Bug 30889: Set userenv for background jobs We need to set the userenv when we process the jobs. It is useful for stats (at least) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #34 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136785 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136785&action=edit Bug 30889: Set interface to 'intranet' Is that correct? Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #35 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136786 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136786&action=edit Bug 30889: (follow-up) Add context field to background_jobs This patch adds a new 'context' field to the background_jobs table to record the context in which the job was queued. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #36 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136787 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136787&action=edit Bug 30889: (follow-up) Record and use context in background_jobs This patch records the current context to the background_jobs table at enqueue time and then uses that record to set the context at process time. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #37 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136788&action=edit Bug 30889: Fix atomic update permissions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #38 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136789 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136789&action=edit Bug 30889: Unit tests This patch adds a unit test for the 'enqueue' part of the bug. We check that the mocked context (and interface) are recorded with the job enqueue in the new 'context' field. We do not yet test the 'process' end, where we then read the context out and set the job Context from it. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #39 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136790 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136790&action=edit Bug 30889: Unit tests - process This patch adds corresponding unit tests for the 'process' side of this patchset. We check that the Context for the job to run in as set from the Job context recorded at enqueue time. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #40 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136791 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136791&action=edit Bug 30889: Add comment for the new DB field Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #41 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136792 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136792&action=edit [DO NOT PUSH] Bug 30889: Schema update Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #42 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #43 from Tomás Cohen Arazi <tomascohen@gmail.com> --- The error in the tests highlights an issue: existing jobs might not have 'context' set. We need to deal with those more gracefully. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 --- Comment #44 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136904 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136904&action=edit Bug 30889: (follow-up) Warn if context is not defined Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136904|0 |1 is obsolete| | --- Comment #45 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136948 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136948&action=edit Bug 30889: (follow-up) Warn if context is not defined Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|22.11.00 |22.11.00, 22.05.04 released in| | --- Comment #46 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for 22.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED CC| |arthur.suzuki@biblibre.com Resolution|--- |FIXED --- Comment #47 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- This one depends on 27783 which is quite a big enhancement to backport... Won't backport this (and dependancies) to 21.11.x. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31351 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31351 [Bug 31351] Worker dies on reindex job when operator last name/first name/branch name contains non-ASCII chars -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30889 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |35758 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35758 [Bug 35758] Background jobs should not log personal data apart from borrowernumber -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org