Bug 9596 - Allow longoverdue.pl to be configured by library
Summary: Allow longoverdue.pl to be configured by library
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 18064
  Show dependency treegraph
 
Reported: 2013-02-12 14:13 UTC by Nicole C. Engard
Modified: 2024-02-16 22:34 UTC (History)
13 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Add branch and skip-branch options to cronjobs/longoverdue.pl (5.87 KB, patch)
2024-02-13 00:23 UTC, Michael Hafen
Details | Diff | Splinter Review
Bug 9596: Add branch and skip-branch options to cronjobs/longoverdue.pl (6.16 KB, patch)
2024-02-16 22:34 UTC, Michael Hafen
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2013-02-12 14:13:58 UTC
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.
Comment 1 Andrew Fuerste-Henry 2020-08-28 16:25:07 UTC
+1 -- But would that be limiting based on the patron branch, the item branch, the issuing branch? The branch specified by circcontrol?
Comment 2 mdanko 2021-10-25 17:11:07 UTC
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.
Comment 3 Todd Goatley 2022-08-08 16:45:44 UTC
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
Comment 4 Andrew Fuerste-Henry 2023-11-17 15:31:06 UTC
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.
Comment 5 Michael Hafen 2024-02-13 00:23:58 UTC
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.
Comment 6 Lucas Gass 2024-02-15 22:00:57 UTC
Michael, great to see a patch here! Is this ready for testing?
Comment 7 Michael Hafen 2024-02-15 22:03:25 UTC
Yes.  Sorry, I forgot to change the status to Needs Signoff.  I'll set that now.
Comment 8 Lucas Gass 2024-02-16 14:53:25 UTC
Thanks Michael, this looks good and works as described. You just need to fix your commit message and perltidy.
Comment 9 Michael Hafen 2024-02-16 22:34:52 UTC
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.