[Bug 18064] New: Long overdue cronjob does not follow the library' s calendar and skip closed days
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Bug ID: 18064 Summary: Long overdue cronjob does not follow the library's calendar and skip closed days Change sponsored?: --- Product: Koha Version: 3.22 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: jzairo@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org The cronjob that sets the Long overdue does not follow the library's calendar and skip closed days. However, the cronjob that sends the email (overdue notices) does follow the library's calendar. So as an example on a weekend where Monday is a holiday, the long over due may get set and chanrge the patrons account, but the email may be sent a day or 2 later. It would be good to allow the long overdue cron to follow the library calendar and skip closed days. -- 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=18064 Jessie Zairo <jzairo@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |gmcharlt@gmail.com |ity.org | CC| |robin@catalyst.net.nz Component|Notices |Command-line Utilities -- 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=18064 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Just a thought on this onem it owuld be nice to add a fourth notice with options for: 'mark returned' 'charge' 'lost value' And allow the fourth notice (or any other if we add options to all) to call the relevant code from longoverdue.pl This would allow us to remove that script - have the calendar taken into account, and allow configuration at the library level by the library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=18064 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com --- Comment #2 from Barton Chittenden <barton@bywatersolutions.com> --- I think this is a bug, not an enhancement -- this is causes confusing and seemingly inconsistent behavior of overdue_notices.pl and fines.pl (when longoverdue.pl runs before the third overdue notice, because the longoverdue delay stays the same, but notices are delayed, or when fines seemingly stop prematurely because items are marked longoverdue). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- If overdue_notices and fines ignore the calendar or use it is determined by system preferences (OverdueNoticeCalendar, finescalendar). So I think we might either tie this to one of them or have another? Otherwise this might be inconsistent for people not using the calendar. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #4 from Barton Chittenden <barton@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #3)
If overdue_notices and fines ignore the calendar or use it is determined by system preferences (OverdueNoticeCalendar, finescalendar). So I think we might either tie this to one of them or have another? Otherwise this might be inconsistent for people not using the calendar.
You're absolutely right; I think this should follow OverdueNoticeCalendar. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Edie Discher <edischer@cityoffargo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |edischer@cityoffargo.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Andrew <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #5 from Andrew <andrew@bywatersolutions.com> --- Giving this bug a bump as this continues to be a source of confusion and frustration for any library that wants their overdues to follow the calendar and their 3rd overdue to line up with their longoverduelost behavior. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com Assignee|gmcharlt@gmail.com |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=18064 --- Comment #6 from Joy Nelson <joy@bywatersolutions.com> --- In order to preserve the current functionality of the long overdue cronjob not following the 'calendar/closed days', we will need a new syspref in the Long Overdue area. DefaultLongOverdueCalendar: Use Calendar/Ignore Calendar when working out the period for setting items to long overdue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Kelly McElligott <kelly@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kelly@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Chris Slone <cslone@camdencountylibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cslone@camdencountylibrary. | |org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@collect | |o.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexandre.breton@ccsr.qc.ca --- Comment #7 from Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> --- *** Bug 22380 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.22 |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #8 from David Cook <dcook@prosentient.com.au> --- I'm also bumping this one, as I've just been bitten by this issue. I'm not currently working on a fix for this, but I'd be happy to test/sign off someone else's patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- (In reply to Joy Nelson from comment #6)
In order to preserve the current functionality of the long overdue cronjob not following the 'calendar/closed days', we will need a new syspref in the Long Overdue area.
DefaultLongOverdueCalendar: Use Calendar/Ignore Calendar when working out the period for setting items to long overdue.
That probably makes sense. We could add a warning in the "System information" in About Koha too if DefaultLongOverdueCalendar and OverdueNoticeCalendar are out of sync. (I've actually been thinking how it would be nice to have some validation of system preferences within the system preference editor, so that administrators could get immediate feedback about their combinations of system preferences, but haven't really thought through the idea completely yet.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #10 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I'm still very much in favor of making this change, but: The patron emailer cron introduced in bug 16149 can be used to send a daily email to all patrons with items that have gone to Long Overdue in the past day, thereby sidestepping the regular overdues process and this issue. But I imagine those libraries that prefer not to send overdues when the library is closed would still prefer not to set overdue items to lost and bill patrons on days the library is closed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Bug 24203 brings up the fact that as the longoverdue cron is now able to differ based on itype while overdues are not. This moves the two processes further apart. This pushes me further into the belief that we should abandon the idea of making overdue notices work for alerting patrons to long overdue charges and should instead work to accomplish that via the patron emailer cron. I just put together a plan for doing so: https://bywatersolutions.com/education/sending-notices-for-long-overdue-item... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #12 from Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> --- +1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Harold <hpark@saclaw.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hpark@saclaw.org --- Comment #13 from Harold <hpark@saclaw.org> --- +1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Christofer Zorn <christofer.zorn@ajaxlibrary.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |christofer.zorn@ajaxlibrary | |.ca --- Comment #14 from Christofer Zorn <christofer.zorn@ajaxlibrary.ca> --- We experienced the same issue ... could we either add an option to the one system pref similar to the "follow or ignore the calendar"? Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P4 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #15 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- Created attachment 130363 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130363&action=edit Bug 18064 : Add syspref to launch longOverdue script with calendar support The problem here is that the longOverdue script does not support calendars and when libraries set their holidays, long overdues do not take this into account. For example, during the covid pandemic, some libraries were closed for days, maybe months, but longOverdue didn't care and set "lost" or other values on the items. This fix / enhancement based on taking calendars into account to test it, regardless of your rules related to longOverdue, I propose this test plan: Test plan : 1) For clearer vision on what the patch does, have at least "2" libraries 2) Go to Tools/Calendar and place holidays, on each of the libraries for example, of any kind (special, repeated, as you want) 3) Manually run the misc/cronjobs/longoverdue.pl script with the -v (verbose) argument to get as much information as possible 4) You will see a common "block", with today's date + 366 days (by default if you don't pass any arguments to the script), holidays are not taken into account in this date range 5) Apply my patch 6) Launch the updatedatabase 7) Set the new system preference "LongOverdueNoticeCalendar" to "use calendar" 8) Repeat step 3 9) You will see in output one line per library and according to the number of days off in the interval of dates, the start date of the analysis will have been postponed by as many days in order to take these holidays into account. If something is not completely clear, we can of course discuss it -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |thibaud.guillot@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kyle@bywatersolutions.com |thibaud.guillot@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #16 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- I'm getting this error when running the cron with LongOverdueNoticeCalendar set to use the calendar: root@kohadevbox:koha(master)$ perl misc/cronjobs/longoverdue.pl -l 5=2 -v ### TEST MODE -- NO ACTIONS TAKEN ### The method Koha::Libraries->branchcode is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Objects.pm line 572 Koha::Objects::AUTOLOAD('Koha::Libraries=HASH(0x563384af1b98)') called at misc/cronjobs/longoverdue.pl line 333 main::get_number_of_holidays('2021-06-08', '2022-06-04') called at misc/cronjobs/longoverdue.pl line 424 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=18064 --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 135888 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135888&action=edit Bug 18064: (follow-up) Get libraries as a list -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Michal Urban <michalurban177@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130363|0 |1 is obsolete| | --- Comment #18 from Michal Urban <michalurban177@gmail.com> --- Created attachment 136213 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136213&action=edit Bug 18064 : Add syspref to launch longOverdue script with calendar support The problem here is that the longOverdue script does not support calendars and when libraries set their holidays, long overdues do not take this into account. For example, during the covid pandemic, some libraries were closed for days, maybe months, but longOverdue didn't care and set "lost" or other values on the items. This fix / enhancement based on taking calendars into account to test it, regardless of your rules related to longOverdue, I propose this test plan: Test plan : 1) For clearer vision on what the patch does, have at least "2" libraries 2) Go to Tools/Calendar and place holidays, on each of the libraries for example, of any kind (special, repeated, as you want) 3) Manually run the misc/cronjobs/longoverdue.pl script with the -v (verbose) argument to get as much information as possible 4) You will see a common "block", with today's date + 366 days (by default if you don't pass any arguments to the script), holidays are not taken into account in this date range 5) Apply my patch 6) Launch the updatedatabase 7) Set the new system preference "LongOverdueNoticeCalendar" to "use calendar" 8) Repeat step 3 9) You will see in output one line per library and according to the number of days off in the interval of dates, the start date of the analysis will have been postponed by as many days in order to take these holidays into account. If something is not completely clear, we can of course discuss it -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Michal Urban <michalurban177@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135888|0 |1 is obsolete| | --- Comment #19 from Michal Urban <michalurban177@gmail.com> --- Created attachment 136214 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136214&action=edit Bug 18064: (follow-up) Get libraries as a list Output: One line per library as expected, along with the date + 366 days for libraries without set holidays, and start dates postponed by 366 days + the amount of days corresponding to library holidays. Added random holidays to 3 different libraries, of different variety, (Holiday Repeating Yearly, Unique Holiday, etc.) and ran longoverdue.pl, getting the same start days, then ran with patch applied and returned above result as expected. Test plan : 1) For clearer vision on what the patch does, have at least "2" libraries 2) Go to Tools/Calendar and place holidays, on each of the libraries for example, of any kind (special, repeated, as you want) 3) Manually run the misc/cronjobs/longoverdue.pl script with the -v (verbose) argument to get as much information as possible 4) You will see a common "block", with today's date + 366 days (by default if you don't pass any arguments to the script), holidays are not taken into account in this date range 5) Apply my patch 6) Launch the updatedatabase 7) Set the new system preference "LongOverdueNoticeCalendar" to "use calendar" 8) Repeat step 3 9) You will see in output one line per library and according to the number of days off in the interval of dates, the start date of the analysis will have been postponed by as many days in order to take these holidays into account. Signed-off-by: Michal Urban <michalurban177@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Michal Urban <michalurban177@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michalurban177@gmail.com 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=18064 --- Comment #20 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 136263 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136263&action=edit Bug 18064: (QA follow-up) Clean up code -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #21 from Kyle M Hall <kyle@bywatersolutions.com> --- Comment on attachment 136213 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136213 Bug 18064 : Add syspref to launch longOverdue script with calendar support Review of attachment 136213: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=18064&attachment=136213) ----------------------------------------------------------------- ::: misc/cronjobs/longoverdue.pl @@ +492,4 @@
} }
+if (!( C4::Context->preference( 'LongOverdueNoticeCalendar' ) )) {
Why is this here? I don't understand the utility of suppressing the summary if using the calendar. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Thibaud, can you please take a look at Kyle's question in comment#21? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136213|0 |1 is obsolete| | Attachment #136214|0 |1 is obsolete| | Attachment #136263|0 |1 is obsolete| | --- Comment #23 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- Created attachment 139978 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139978&action=edit Bug 18064: (follow-up) Remove statement for summary & reorder sysprefs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130363|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130363|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=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135888|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136213|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136214|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135888|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=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136263|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #24 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- (In reply to Kyle M Hall from comment #21)
Comment on attachment 136213 [details] [review] Bug 18064 : Add syspref to launch longOverdue script with calendar support
Review of attachment 136213 [details] [review]: -----------------------------------------------------------------
::: misc/cronjobs/longoverdue.pl @@ +492,4 @@
} }
+if (!( C4::Context->preference( 'LongOverdueNoticeCalendar' ) )) {
Why is this here? I don't understand the utility of suppressing the summary if using the calendar.
Yes you're right. I worked on this script again recently and realized that I had misunderstood this part. We need this output to get the summary, it's my mistake. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #25 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- If you are interested in this script, I have also opened a BZ (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31487) which can be useful if someone can give me their opinion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |lucas@bywatersolutions.com --- Comment #26 from Lucas Gass <lucas@bywatersolutions.com> --- It appears like this one no longer applies in current master. I think the fix is an easy one though in installer/data/mysql/mandatory/sysprefs.sql. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #27 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- Created attachment 145920 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145920&action=edit Bug 18064: (follow up) rebase on master and reorder syspref -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #28 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- (In reply to Lucas Gass from comment #26)
It appears like this one no longer applies in current master. I think the fix is an easy one though in installer/data/mysql/mandatory/sysprefs.sql.
Thanks for your feedback, patch actually rebased on fresh master :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #29 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- Created attachment 147496 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147496&action=edit Bug 18064: (follow-up) Fix var type 'holidays_by_branch' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Thibaud Guillot <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147496|0 |1 is obsolete| | --- Comment #30 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- Created attachment 147497 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147497&action=edit Bug 18064: (follow-up) Fix var type 'holidays_by_branch' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #31 from Thibaud Guillot <thibaud.guillot@biblibre.com> --- Actually rebased this patch on master. Try to go forward with this :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #32 from Lucas Gass <lucas@bywatersolutions.com> --- Needs rebased again due to changes in sysprefs.sql -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #33 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I fixed the first conflict in sysprefs.sql, but then sadly got stuck a bit later again: git bz apply --continue Applying: Bug 18064 : Add syspref to launch longOverdue script with calendar support Applying: Bug 18064: (follow-up) Get libraries as a list Applying: Bug 18064: (QA follow-up) Clean up code Applying: Bug 18064: (follow-up) Remove statement for summary & reorder sysprefs error: sha1 information is lacking or useless (installer/data/mysql/mandatory/sysprefs.sql). error: could not build fake ancestor Patch failed at 0001 Bug 18064: (follow-up) Remove statement for summary & reorder sysprefs hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-18064-follow-up-Remove-statement-for-summary---jkamgi1_.patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Lisette Scheer <lisette.scheer@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette.scheer@bywatersolut | |ions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Suzanne <smhodson123extra@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |smhodson123extra@yahoo.com --- Comment #34 from Suzanne <smhodson123extra@yahoo.com> --- I would love to see this get resolved! It is very tricky to be using two different calendars when trying to set up overdue notices and lost items. Thanks for working on it! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136213|0 |1 is obsolete| | Attachment #136214|0 |1 is obsolete| | Attachment #136263|0 |1 is obsolete| | Attachment #139978|0 |1 is obsolete| | Attachment #145920|0 |1 is obsolete| | Attachment #147497|0 |1 is obsolete| | --- Comment #35 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 159088 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159088&action=edit Bug 18064: Add syspref to launch longOverdue script with calendar support The problem here is that the longOverdue script does not support calendars and when libraries set their holidays, long overdues do not take this into account. For example, during the covid pandemic, some libraries were closed for days, maybe months, but longOverdue didn't care and set "lost" or other values on the items. This fix / enhancement based on taking calendars into account to test it, regardless of your rules related to longOverdue, I propose this test plan: Test plan : 1) For clearer vision on what the patch does, have at least "2" libraries 2) Go to Tools/Calendar and place holidays, on each of the libraries for example, of any kind (special, repeated, as you want) 3) Manually run the misc/cronjobs/longoverdue.pl script with the -v (verbose) argument to get as much information as possible 4) You will see a common "block", with today's date + 366 days (by default if you don't pass any arguments to the script), holidays are not taken into account in this date range 5) Apply my patch 6) Launch the updatedatabase 7) Set the new system preference "LongOverdueNoticeCalendar" to "use calendar" 8) Repeat step 3 9) You will see in output one line per library and according to the number of days off in the interval of dates, the start date of the analysis will have been postponed by as many days in order to take these holidays into account. If something is not completely clear, we can of course discuss it -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #36 from Nick Clemens <nick@bywatersolutions.com> --- Rebased and squashed. As far as I can tell, this correctly fetches the calendar per branch, however, the items queries do not take branches into account - so we run a query per branch with different date ranges, but don't limit the items by branch. I think we also need a switch here to control how we will decide which branch to apply - is it the patron's branch? the item's home/holding branch? I think this could follow CircControl - but needs some logic Moving to Failed QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |9596 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9596 [Bug 9596] Allow longoverdue.pl to be configured by library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #37 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- (In reply to Nick Clemens from comment #36)
Rebased and squashed.
As far as I can tell, this correctly fetches the calendar per branch, however, the items queries do not take branches into account - so we run a query per branch with different date ranges, but don't limit the items by branch.
I think we also need a switch here to control how we will decide which branch to apply - is it the patron's branch? the item's home/holding branch? I think this could follow CircControl - but needs some logic
Moving to Failed QA.
That's a great point, though I'm not at all happy about it. Longoverdue does not currently have any concept of branch-specificity (see BZ 9596). There is no branch-agnostic calendar. This one can't move forward without BZ 9596. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #38 from Suzanne <smhodson123extra@yahoo.com> --- Any hope for this to get resolved? Just thought I'd check in on it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Koha collecto <koha@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |koha@collecto.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Bug 18064 depends on bug 9596, which changed state. Bug 9596 Summary: Allow longoverdue.pl to be configured per library on the command line https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9596 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Bug 18064 depends on bug 9596, which changed state. Bug 9596 Summary: Allow longoverdue.pl to be configured per library on the command line https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9596 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Eric Swenson <eric@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric@bywatersolutions.com --- Comment #39 from Eric Swenson <eric@bywatersolutions.com> --- Popping in to also voice an interest in seeing this still become a reality. We have had several libraries recently run into the conflict between their long overdue settings and their ODUE3 triggers. This would be a great addition! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #40 from Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> --- Hello everyone and happy new year 2025 :D If I understand correctly the FQA status on this bz was the non-limitation of items per branch, which has been integrated on main with bug 9596. This bug simply adds a function that checks the calendar, so the controls resulting from bug 9596 are the same now, so can this patch go back to NSO? Have a nice day -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=18064 Kristi <kkrueger@cuyahogalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkrueger@cuyahogalibrary.or | |g -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |no-sandbox -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #41 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Thibaud Guillot (thibaud_g) from comment #40)
Hello everyone and happy new year 2025 :D
If I understand correctly the FQA status on this bz was the non-limitation of items per branch, which has been integrated on main with bug 9596. This bug simply adds a function that checks the calendar, so the controls resulting from bug 9596 are the same now, so can this patch go back to NSO?
Have a nice day
Testing here will be impacted by bug 38894 - be aware the longoverdue cron currently always uses item homebranch when CircControl is set to item library. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #42 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- This is not correctly matching checkouts and holidays. I have: - 2 patrons, both with branch=CPL - 2 items, one owned by CPL, one by MPL - both items checked out at CPL, one to either patron - CircControl set to "library the item is from," HomeOrHoldingBranch set to "item's home libary" With LongOverdueNoticeCalendar = "ignore" - perl misc/cronjobs/longoverdue.pl -v finds 2 checkouts - perl misc/cronjobs/longoverdue.pl -v -library='CPL' finds 1 checkout - perl misc/cronjobs/longoverdue.pl -v -library='MPL' finds 1 checkout - perl misc/cronjobs/longoverdue.pl -v -library='UPL' finds 0 checkouts But if I set LongOverdueNoticeCalendar = "use" then 'perl misc/cronjobs/longoverdue.pl -v' gives me the following: ### TEST MODE -- NO ACTIONS TAKEN ### Branchcode CPL Due 1 - 366 days ago (2024-01-22 to 2025-01-21) - with 0 holiday(s), lost => 2 Branchcode FFL Due 1 - 366 days ago (2024-01-22 to 2025-01-21) - with 0 holiday(s), lost => 2 Branchcode FPL Due 1 - 366 days ago (2024-01-22 to 2025-01-21) - with 0 holiday(s), lost => 2 Branchcode FRL Due 1 - 366 days ago (2024-01-22 to 2025-01-21) - with 0 holiday(s), lost => 2 Branchcode IPT Due 1 - 366 days ago (2024-01-22 to 2025-01-21) - with 0 holiday(s), lost => 2 Branchcode LPL Due 1 - 366 days ago (2024-01-22 to 2025-01-21) - with 0 holiday(s), lost => 2 Branchcode MPL Due 1 - 420 days ago (2023-11-29 to 2025-01-21) - with 54 holiday(s), lost => 2 Branchcode PVL Due 1 - 366 days ago (2024-01-22 to 2025-01-21) - with 0 holiday(s), lost => 2 Branchcode RPL Due 1 - 366 days ago (2024-01-22 to 2025-01-21) - with 0 holiday(s), lost => 2 Branchcode SPL Due 1 - 366 days ago (2024-01-22 to 2025-01-21) - with 0 holiday(s), lost => 2 Branchcode TPL Due 1 - 366 days ago (2024-01-22 to 2025-01-21) - with 0 holiday(s), lost => 2 Branchcode UPL Due 1 - 367 days ago (2024-01-21 to 2025-01-21) - with 1 holiday(s), lost => 2 Due 2025-01-20 23:59:00: item 505 from borrower 19 to lost: 2 Due 2025-01-20 23:59:00: item 506 from borrower 5 to lost: 2 ### LONGOVERDUE SUMMARY ### Range 1 Due 1 - 366 days ago (2024-01-22 to 2025-01-21), lost => 2 2 items TOTAL: 2 items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Kimberly <kimberly.diebolt@edcgov.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kimberly.diebolt@edcgov.us -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Catrina Berka <catrina@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |catrina@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #43 from Eric Swenson <eric@bywatersolutions.com> --- Still cheering for this bug! Maybe 2026 will be the year! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 --- Comment #44 from Kimberly <kimberly.diebolt@edcgov.us> --- (In reply to Eric Swenson from comment #43)
Still cheering for this bug! Maybe 2026 will be the year!
Me too! We have one branch that's open so few days patrons for that branch don't get the ODUE3 notices, and thus don't get a restriction for lost items. I have to manually add a restriction for those patrons. We've tried to adjust the days but then our other branches/patrons have more days between getting the ODUE3 and the item actually being marked lost. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18064 Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=18064 Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159088|0 |1 is obsolete| | --- Comment #45 from Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> --- Created attachment 199197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199197&action=edit Bug 18064: Add syspref to launch longOverdue script with calendar support The problem here is that the longOverdue script does not support calendars and when libraries set their holidays, long overdues do not take this into account. For example, during the covid pandemic, some libraries were closed for days, maybe months, but longOverdue didn't care and set "lost" or other values on the items. The fix computes open (business) days per item using the calendar of its governing library (per LostChargesControl), and skips items whose open-day count since the due date has not yet reached the configured threshold. Test plan: 1) Have at least 2 libraries 2) Go to Tools/Calendar and add special holidays on one library only 3) Check out items from both libraries with due dates old enough to trigger longoverdue 4) Run: perl misc/cronjobs/longoverdue.pl -v --lost 30=1 Items from both libraries appear (calendar ignored, holidays have no effect) 5) Apply this patch and run updatedatabase 6) Set system preference LongOverdueNoticeCalendar to "Use calendar" 7) Run the same command again Items from the library with enough holidays to bring their open-day count below the threshold are skipped; items from the other library are still processed 8) Run with --confirm to apply changes Sponsored-by: Biblibre -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org