[Bug 17506] New: Offline circ needs to be logged
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Bug ID: 17506 Summary: Offline circ needs to be logged Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: cbrannon@cdalibrary.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com I recently spent about an hour and a half going over logs trying to figure out why old checkouts were showing up on patron records, and the logs were not lining up. We finally came to the assumption that someone uploaded an old offline circ file. Unfortunately, there is nothing in the logs to record offline circ transactions, and nothing tied to the specific checkouts either. It would REALLY be helpful if the logs would record offline circ transactions, including date of upload, and date of the transaction. It would also be helpful if the item history would indicate a transaction through offline circ and when the transaction was processed. It would be really cool if I could get that hour and a half back. -- 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=17506 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P1 - high -- 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=17506 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |22794 CC| |katrin.fischer@bsz-bw.de Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22794 [Bug 22794] Omnibus: Improve and extend logging in Koha -- 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=17506 Rebecca Coert <rcoert@arlingtonva.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rcoert@arlingtonva.us -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #1 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Looking at the code for this today, it appears that checkouts and renewals *will* get written to the action logs from offline circ, but returns are not. -- 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=17506 --- Comment #2 from Rebecca Coert <rcoert@arlingtonva.us> --- I agree with Christopher - all Offline Circulation transactions should be logged for possible troubleshooting. Issues, Renewals AND Returns. -- 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=17506 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=17506 --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 132971 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132971&action=edit Bug 17506: Offline circ needs to be logged Returns via offline circ are not logged. Test Plan: 1) Via offline circ * Return some items checked out to patrons * Check out some items that are currently checked out to other patrons 2) Apply the offline circs to Koha 3) Note the checkouts are logged, but not the returns 4) Apply this patch, restart all the things! 5) Repeat steps 1 and 2 6) Note the checkins are now logged both for returns and for checkouts where the item was checked out to a different patron -- 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=17506 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Christopher Brannon <cbrannon@cdalibrary.org> --- I tried two provisions in a sandbox with this patch. Patch loaded, but when I restarted services in both provisions, I was greeted with these errors: Stopping Plack daemon for b17506:. Stopping Z39.50/SRU daemon for b17506:. Stopping Koha worker daemon for b17506:. Stopping Koha indexing daemon for b17506:. Starting Plack daemon for b17506:. Starting Z39.50/SRU daemon for b17506:"my" variable $operation masks earlier declaration in same scope at /kohadevbox/koha/C4/Circulation.pm line 4075. "my" variable $patron masks earlier declaration in same scope at /kohadevbox/koha/C4/Circulation.pm line 4077. syntax error at /kohadevbox/koha/C4/Circulation.pm line 4031, near "} else" Unmatched right curly bracket at /kohadevbox/koha/C4/Circulation.pm line 4034, at end of line Can't redeclare "my" in "my" at /kohadevbox/koha/C4/Circulation.pm line 4039, near "my" Global symbol "$operation" requires explicit package name (did you forget to declare "my $operation"?) at /kohadevbox/koha/C4/Circulation.pm line 4039. syntax error at /kohadevbox/koha/C4/Circulation.pm line 4069, near "}" Unmatched right curly bracket at /kohadevbox/koha/C4/Circulation.pm line 4072, at end of line Can't redeclare "my" in "my" at /kohadevbox/koha/C4/Circulation.pm line 4077, near "my" syntax error at /kohadevbox/koha/C4/Circulation.pm line 4088, near "}" Can't use global @_ in "my" at /kohadevbox/koha/C4/Circulation.pm line 4099, near "= @_" Global symbol "$itemnumber" requires explicit package name (did you forget to declare "my $itemnumber"?) at /kohadevbox/koha/C4/Circulation.pm line 4103. Global symbol "$itemnumber" requires explicit package name (did you forget to declare "my $itemnumber"?) at /kohadevbox/koha/C4/Circulation.pm line 4103. Global symbol "$barcode" requires explicit package name (did you forget to declare "my $barcode"?) at /kohadevbox/koha/C4/Circulation.pm line 4104. syntax error at /kohadevbox/koha/C4/Circulation.pm line 4118, near "}" /kohadevbox/koha/C4/Circulation.pm has too many errors. Compilation failed in require at /kohadevbox/koha/Koha/Items.pm line 27. BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/Items.pm line 27. Compilation failed in require at /kohadevbox/koha/Koha/Recall.pm line 25. BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/Recall.pm line 25. Compilation failed in require at /kohadevbox/koha/Koha/Recalls.pm line 23. BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/Recalls.pm line 23. Compilation failed in require at /kohadevbox/koha/C4/XSLT.pm line 33. BEGIN failed--compilation aborted at /kohadevbox/koha/C4/XSLT.pm line 33. Compilation failed in require at /kohadevbox/koha/Koha/Biblio.pm line 27. BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/Biblio.pm line 27. Compilation failed in require at /kohadevbox/koha/Koha/Biblios.pm line 25. BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/Biblios.pm line 25. Compilation failed in require at /kohadevbox/koha/Koha/Libraries.pm line 25. BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/Libraries.pm line 25. Compilation failed in require at /kohadevbox/koha/Koha/Object/Limit/Library.pm line 22. BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/Object/Limit/Library.pm line 22. Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl-base/base.pm line 135. ...propagated at /usr/lib/x86_64-linux-gnu/perl-base/base.pm line 157. BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/AuthorisedValue.pm line 25. Compilation failed in require at /kohadevbox/koha/Koha/AuthorisedValues.pm line 25. BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/AuthorisedValues.pm line 25. Compilation failed in require at /kohadevbox/koha/C4/Koha.pm line 27. BEGIN failed--compilation aborted at /kohadevbox/koha/C4/Koha.pm line 27. Compilation failed in require at /kohadevbox/koha/C4/Biblio.pm line 91. BEGIN failed--compilation aborted at /kohadevbox/koha/C4/Biblio.pm line 91. Compilation failed in require at /kohadevbox/koha/Koha/Z3950Responder.pm line 22. BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/Z3950Responder.pm line 22. Compilation failed in require at /kohadevbox/koha/misc/z3950_responder.pl line 27. BEGIN failed--compilation aborted at /kohadevbox/koha/misc/z3950_responder.pl line 27. [31mfailed![39;49m Starting Koha worker daemon for b17506:. Starting Koha indexing daemon for b17506:. Reloading Apache httpd web server: apache2. memcached -- 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=17506 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | CC| |kyle@bywatersolutions.com -- 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=17506 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132971|0 |1 is obsolete| | --- Comment #5 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 147842 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147842&action=edit Bug 17506: Offline circ needs to be logged Returns via offline circ are not logged. Test Plan: 1) Via offline circ * Return some items checked out to patrons * Check out some items that are currently checked out to other patrons 2) Apply the offline circs to Koha 3) Note the checkouts are logged, but not the returns 4) Apply this patch, restart all the things! 5) Repeat steps 1 and 2 6) Note the checkins are now logged both for returns and for checkouts where the item was checked out to a different patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 --- Comment #6 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- Created attachment 151697 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151697&action=edit Offline circ fule This koc file includes a checkout each to two different patrons and then the checkin of one of those items, all using the default testing data. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147842|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 151698 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151698&action=edit Bug 17506: Offline circ needs to be logged Returns via offline circ are not logged. Test Plan: 1) Via offline circ * Return some items checked out to patrons * Check out some items that are currently checked out to other patrons 2) Apply the offline circs to Koha 3) Note the checkouts are logged, but not the returns 4) Apply this patch, restart all the things! 5) Repeat steps 1 and 2 6) Note the checkins are now logged both for returns and for checkouts where the item was checked out to a different patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151698|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 151699 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151699&action=edit Bug 17506: Offline circ needs to be logged Returns via offline circ are not logged. Test Plan: 1) Via offline circ * Return some items checked out to patrons * Check out some items that are currently checked out to other patrons 2) Apply the offline circs to Koha 3) Note the checkouts are logged, but not the returns 4) Apply this patch, restart all the things! 5) Repeat steps 1 and 2 6) Note the checkins are now logged both for returns and for checkouts where the item was checked out to a different patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |33838 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33838 [Bug 33838] Offline circulation interface error on return -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 --- Comment #9 from Christopher Brannon <cbrannon@cdalibrary.org> --- Haven't looked at this yet, but would it be helpful if offline circ file processing gave warnings on transactions that are older than the item's last timestamp? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 --- Comment #10 from Christopher Brannon <cbrannon@cdalibrary.org> --- Maybe in another bug??? Just wondering. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #11 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- I see log entries for checkouts and for returns where the return was forced by a checkout to a different patron. I am not getting log entries for regular returns. Possibly related, a filed bug 33838 for some wonky display/interface stuff with returns. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 --- Comment #12 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- Created attachment 151707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151707&action=edit log action error With 33838 patched the return logs correctly! I realized there's a tiny error with the return due to checkout to a different patron. It's recording "issue" for the action for that, instead of return. See attached screenshot in which item 3999900000002 is checked out to Edna via offline circ. The entry that's a checkout with no object should be a return. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Andrew Fuerste-Henry from comment #12)
Created attachment 151707 [details] log action error
With 33838 patched the return logs correctly! I realized there's a tiny error with the return due to checkout to a different patron. It's recording "issue" for the action for that, instead of return. See attached screenshot in which item 3999900000002 is checked out to Edna via offline circ. The entry that's a checkout with no object should be a return.
Are you testing with the latest version of the patch? I caught a bug in it earlier that is now fixed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151699|0 |1 is obsolete| | --- Comment #14 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- Created attachment 151708 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151708&action=edit Bug 17506: Offline circ needs to be logged Returns via offline circ are not logged. Test Plan: 1) Via offline circ * Return some items checked out to patrons * Check out some items that are currently checked out to other patrons 2) Apply the offline circs to Koha 3) Note the checkouts are logged, but not the returns 4) Apply this patch, restart all the things! 5) Repeat steps 1 and 2 6) Note the checkins are now logged both for returns and for checkouts where the item was checked out to a different patron Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 --- Comment #15 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- (In reply to Kyle M Hall from comment #13)
Are you testing with the latest version of the patch?
Apparently not! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- sub ProcessOfflineIssue This is a bit weird. We are logging ISSUE when ReturnLog is enabled. What we probably should do here, is log both logging the return when ReturnLog is eanbled and logging the issue when IssueLog is enabled after AddIssue. FQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151708|0 |1 is obsolete| | --- Comment #17 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 176184 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176184&action=edit Bug 17506: Offline circ needs to be logged Returns via offline circ are not logged. Test Plan: 1) Via offline circ * Return some items checked out to patrons * Check out some items that are currently checked out to other patrons 2) Apply the offline circs to Koha 3) Note the checkouts are logged, but not the returns 4) Apply this patch, restart all the things! 5) Repeat steps 1 and 2 6) Note the checkins are now logged both for returns and for checkouts where the item was checked out to a different patron Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 --- Comment #18 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 176185 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176185&action=edit Bug 17506: (follow-up) Check IssueLog syspref when logging offline checkout -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |victor@tuxayo.net --- Comment #19 from Victor Grousset/tuxayo <victor@tuxayo.net> --- With this .koc file: Version=1.0 Generator=kocDesktop GeneratorVersion=1.3 2023-05-25 10-27-52 127 issue 23529000035676 3999900000001 2023-05-25 10-28-20 046 return 3999900000001 2023-05-25 10-29-52 127 issue 23529000035676 3999900000002 2023-05-25 10-30-48 862 issue 23529000318858 3999900000002 2023-05-25 10-31-20 046 return 3999900000002 I get the following logs (ordered in the same order as the .koc file)
05:10 Checkout Henry Acevedo (19) Item 3999900000001 Staff interface 05:10 Return Item 3999900000001 Staff interface 05:10 Checkout Henry Acevedo (19) Item 3999900000002 Staff interface 05:10 Checkout Item 3999900000002 Staff interface 05:10 Checkout Pamela Bennett (32) Item 3999900000002 Staff interface 05:10 Return Item 3999900000002 Staff interface
The 4th log line is the forced check-in triggered by checking out an already checked-out item to another patron. But it's marked as a checkout. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 --- Comment #20 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Comment on attachment 176185 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176185 Bug 17506: (follow-up) Check IssueLog syspref when logging offline checkout Review of attachment 176185: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17506&attachment=176185) ----------------------------------------------------------------- ::: C4/Circulation.pm @@ +4301,4 @@
);
logaction("CIRCULATION", "ISSUE", $issue->{borrowernumber}, $itemnumber) + if C4::Context->preference("IssueLog");
The preference check before was correct. Here we just did a forced check-in/return [1] but we are logging a checkout. So it's the logaction() call that should have been flipped and not the syspref check. [1] because we are just after MarkIssueReturned() Which doesn't log so the check-in needs to be logged. And the actual checkout will done be just after with AddIssue(). Which includes logging. I got confused a few times when looking at this so I'm not 100% sure. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Kris <kbecker@jcls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kbecker@jcls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17506 Brenda <bowens@washoecounty.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bowens@washoecounty.us -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org