[Bug 38893] New: Longoverdue cronjob gives error when run with "--library" flag and CircControl syspref set to "The library you are logged in at"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38893 Bug ID: 38893 Summary: Longoverdue cronjob gives error when run with "--library" flag and CircControl syspref set to "The library you are logged in at" Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz Depends on: 9596 Bug 9596 added the ability to limit longoverdue by library. The determination of which library to use for a given checkout is made based on the CircControl system preference. One of the options for CircControl is "The library you're logged in at." If CircControl is set to "the library you're logged in at" and you run the longoverdue cron with the --library flag set, you get the error "Use of uninitialized value $lib in hash element at misc/cronjobs/longoverdue.pl line 484." because Koha doesn't know how to pick a branch -- no one is logged in. Setting this to normal as it seems like mostly a "don't configure it like this" issue. But maybe we should give the cron something to follow if the syspref is logged-in-branch? Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9596 [Bug 9596] Allow longoverdue.pl to be configured per library on the command line -- 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=38893 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |38894 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38894 [Bug 38894] Longoverdue cron should follow HomeOrHoldingBranch as well as CircControl when using --library flag -- 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=38893 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |andrew@bywatersolutions.com |ity.org | -- 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=38893 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38893 --- Comment #1 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 176535 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176535&action=edit Bug 38893: Quit job with message when longoverdue run with --library and CircControl set to logged in library To test: 1: Set CircControl to "the item's library" and run longoverdue with the --library flag, it works 2: Set CircControl to "the library you are logged in at" and run longoverdue, it gives an error 3: Apply patch, restart all 4: run longoverdue, it quits and tells you "Use of --library flag not permitted when the CircControl system preference set to 'the library you are logged in at'" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38893 --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Possible there's a better solution here, but this is an improvement. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38893 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38893 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38893 Jake Deery <jake.deery@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jake.deery@ptfs-europe.com --- Comment #3 from Jake Deery <jake.deery@ptfs-europe.com> --- I'm afraid I'm gonna need a more descriptive test plan. When checked out on main, I get this when running the script: kohadev-koha@kohadevbox:koha(main)$ ./misc/cronjobs/longoverdue.pl --confirm --library Option library requires an argument Weirdly, I get this if I flip the flags around: kohadev-koha@kohadevbox:koha(main)$ ./misc/cronjobs/longoverdue.pl --library --confirm ### TEST MODE -- NO ACTIONS TAKEN ### The library --confirm does not exist in the database Worth noting, this happens with `CircControl` set any which way. ... the script does seem wonky, but I can't add my sign-off line without reproducing the issue. Sorry Andrew, could you provide more information for me? Jake. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38893 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176535|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176889 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176889&action=edit Bug 38893: Quit job with message when longoverdue run with --library and CircControl set to logged in library To test: 1: Set CircControl to "the item's library" and run longoverdue with the --library flag, it works 2: Set CircControl to "the library you are logged in at" and run longoverdue, it gives an error 3: Apply patch, restart all 4: Run longoverdue, it quits and tells you "Use of --library flag not permitted when the CircControl system preference set to 'the library you are logged in at'" 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=38893 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38893 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|martin.renvoize@ptfs-europe |testopia@bugs.koha-communit |.com |y.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38893 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- I think this makes sense.. did wonder if we aught to just set $lib to the current library the loop is acting on.. i.e whatever was passed to the --library option of the script.. CircControl is a bit of a nonsense in this configuration here though I agree. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38893 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.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=38893 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Not sure why we just test this sofar in the script. Feels like we should test it much earlier and bail out. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38893 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=38893 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Marcel de Rooy from comment #6)
Not sure why we just test this sofar in the script. Feels like we should test it much earlier and bail out.
Yes, good idea. I think we can just test if CircControl is set to the logged in library option and if a branch/library flag is passed. In which case, we bail. :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org