It would be nice if the longoverdue script took a list of branch codes as a value so that each library could have different settings for long overdue. Or nicer still if it was just built in to Koha's staff GUI.
+1 -- But would that be limiting based on the patron branch, the item branch, the issuing branch? The branch specified by circcontrol?
I would love to have the longoverdue script be granular to the issuing branch. It makes sense to me if a patron borrows materials from our branch, they need to follow our loan rules...including if an item is longoverdue and will get billed. This would be a great place to start I think.
It would be great if this is added to circ & fine. Consortium's with a number of defined items could set this up per library making life easier on the individual libraries. This would be fantastic for stand alone libraries as well. Please, please, please someone take this on! :~D
Bug 31157 created a system preference to determine which library's rules to follow when generating overdue notices and restrictions. I think it'd make sense to create a comparable system preference for long overdue notices. It wouldn't be *wrong* to make long overdues just follow the syspref for overdues, but it does feel like someone's going to come up with a compelling need for the distinction sooner or later.
Created attachment 162070 [details] [review] Add branch and skip-branch options to cronjobs/longoverdue.pl Test plan: 1. apply patch 2. identify two books at different branches the same number of days overdue. 3. run the longoverdue.pl script specifying one of the branches in the --branch command line parameter. 4. observe that the book at the specified branch has been or would be affected by the script while the other book is not.
Michael, great to see a patch here! Is this ready for testing?
Yes. Sorry, I forgot to change the status to Needs Signoff. I'll set that now.
Thanks Michael, this looks good and works as described. You just need to fix your commit message and perltidy.
Created attachment 162250 [details] [review] Bug 9596: Add branch and skip-branch options to cronjobs/longoverdue.pl [ Tidied and commit message fixed ] This script doesn't seem to be included in cron files by default. This change is to allow script parameters to effect only certain branches. This allows the script to be added multiple times to a cron file with different settings for different branches. Test plan: 1. apply patch 2. identify two books at different branches the same number of days overdue. 3. run the longoverdue.pl script specifying one of the branches in the --branch command line parameter. i.e. koha-shell -c 'misc/cronjobs/longoverdue.pl --branch branch_code --lost 60=2 --maxdays=61 --confirm' instance_name 4. observe that the book at the specified branch has been or would be affected by the script while the other book is not.
I believe this is back to needs signoff with the updated patch, though I wouldn't be surprised if it needs a rebase.
Yes, please sign off. I tried applying to main as of 2024-05-23, and it applies cleanly.
Created attachment 167343 [details] [review] Bug 9596: Add branch and skip-branch options to cronjobs/longoverdue.pl This script doesn't seem to be included in cron files by default. This change is to allow script parameters to effect only certain branches. This allows the script to be added multiple times to a cron file with different settings for different branches. Test plan: 1. apply patch 2. identify two books at different branches the same number of days overdue. 3. run the longoverdue.pl script specifying one of the branches in the --branch command line parameter. i.e. koha-shell -c 'misc/cronjobs/longoverdue.pl --branch branch_code --lost 60=2 --maxdays=61 --confirm' instance_name 4. observe that the book at the specified branch has been or would be affected by the script while the other book is not. Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Created attachment 169405 [details] [review] Bug 9596: Add branch and skip-branch options to cronjobs/longoverdue.pl This script doesn't seem to be included in cron files by default. This change is to allow script parameters to effect only certain branches. This allows the script to be added multiple times to a cron file with different settings for different branches. Test plan: 1. apply patch 2. identify two books at different branches the same number of days overdue. 3. run the longoverdue.pl script specifying one of the branches in the --branch command line parameter. i.e. koha-shell -c 'misc/cronjobs/longoverdue.pl --branch branch_code --lost 60=2 --maxdays=61 --confirm' instance_name 4. observe that the book at the specified branch has been or would be affected by the script while the other book is not. Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 169406 [details] [review] Bug 9596: (QA follow-up) Add some clarifying comments Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 169407 [details] [review] Bug 9596: (QA follow-up) Only find a given patron once
Can we please switch from branch to library for the new options and in documentation, etc. please? We are trying to match the language in the GUI whenever possible to create more consistency. See: https://wiki.koha-community.org/wiki/Terminology I know it feels nit-picky, but if we don't do it now, it will cause much more trouble if we wanted to do it later once libraries are using these parameters.
Created attachment 170213 [details] [review] Bug 9596: Add library and skip-library options to cronjobs/longoverdue.pl [rebase to 2024-08-05 and change cli option from --branch to --library for QA] [ I hope it's ok that I squashed it ] This script doesn't seem to be included in cron files by default. This change is to allow script parameters to effect only certain libraries. This allows the script to be added multiple times to a cron file with different settings for different libraries. Test plan: 1. apply patch 2. identify two books at different libraries the same number of days overdue. 3. run the longoverdue.pl script specifying one of the libraries in the --library command line parameter. i.e. koha-shell -c 'misc/cronjobs/longoverdue.pl --library branch_code --lost 60=2 --maxdays=61 --confirm' instance_name 4. observe that the book at the specified library has been or would be affected by the script while the other book is not. Bug 9596: (QA follow-up) Add some clarifying comments Bug 9596: (QA follow-up) Only find a given patron once
A note for Monday... I forgot to remove the patches from my branch before pushing and now we can either revert/push this or we could do a follow-up with the renaming.
I'm inclined to say, since BugZilla has been changed, it might be better to revert/push. I don't see a way to un-obsolete patches here.
(In reply to Michael Hafen from comment #19) > I'm inclined to say, since BugZilla has been changed, it might be better to > revert/push. I don't see a way to un-obsolete patches here. un-obsoleting can be done from the GUI, just not with git bz - do you want me to do it so you can take a look? But both options are fine for me, we just need to resolve.
Let's go with which ever is easier for you. I expect revert/push would be easier than un-obsoleting the three patches that were pushed, but probably only a little easier.
I can't do the revert before Monday, but will do it once I get into work.
Finally found how to un-obsolete a patch. I've changed my mind. I can un-obsolete the patches, and provide one with the option name change. That would be easier for you. Should the follow-up patch be on a new bug?
I figure this bug is effective pushed, so I made another bug with the follow up patch. I think I accidentally set the status to 'RESOLVED' too. I'm not sure what it's supposed to be though, so I'll leave that for you to change if you don't mind.
(In reply to Michael Hafen from comment #24) > I figure this bug is effective pushed, so I made another bug with the follow > up patch. > I think I accidentally set the status to 'RESOLVED' too. I'm not sure what > it's supposed to be though, so I'll leave that for you to change if you > don't mind. Sorry, I was too slow. A follow-up on this bug would be great. Using the same bug number makes it easier to track and it hasn't been released yet (we always need a new bug after release).
Created attachment 170222 [details] [review] Bug 9596: Follow-up to change the option and documentation to match Terminology Guidelines Change the --branch and --skip-branch options to --library and --skip-library to meet the Terminology Guidelines.
*** Bug 37613 has been marked as a duplicate of this bug. ***
Picking the follow-up for main. Please note that I updated the commit message a bit.
Hm, we missed the wrong bug number on the commit message: Subject: [PATCH] Bug 37613: Follow-up to bug 9596 to change the option and documentation to match Terminology Guidelines Content-Type: text/plain; charset="utf-8" Need to keep that in mind for manually editing release notes later. Michael: it looks like you are not using git bz?
Enhancement will not be backported to 24.05.x
New script parameters already documented by Caroline Cyr La Rose (https://gitlab.com/koha-community/koha-manual/-/merge_requests/967) Just needs to add version notes.