Bug 39802 - Add CircControl equivalent system preference for lost item fees and actions
Summary: Add CircControl equivalent system preference for lost item fees and actions
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 9596
Blocks: 36506
  Show dependency treegraph
 
Reported: 2025-05-01 16:01 UTC by Andrew Fuerste-Henry
Modified: 2025-08-06 18:02 UTC (History)
2 users (show)

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


Attachments
Bug 39802: Add LostChargesControl system preference (3.64 KB, patch)
2025-08-06 15:22 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 39802: Use new preference in longoverdue cron (1.69 KB, patch)
2025-08-06 15:22 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 39802: Report when no branches will be selected and exit (1.97 KB, patch)
2025-08-06 15:22 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 39802: Atomic update file (1.58 KB, patch)
2025-08-06 18:02 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2025-05-01 16:01:26 UTC
We need something like CircControlLostBranch with which to specify which branch should be followed for actions and fees related to lost items.

Since Bug 9596 the longoverdue cron can be limited by branch, but it follows CircControl when doing so. Lost item fee and processing fee refunds also follow CircControl.

However, some libraries want checkout limits and periods to be governed by issuing branch but lost item behavior to be based on the owning library of the item.
Comment 1 Andrew Fuerste-Henry 2025-05-01 16:29:03 UTC
I forgot about our friend RefundLostOnReturnControl, so I was a bit wrong in my first comment.

The longoverdue cron follows CircControl currently.
Lost item fee refunds follow RefundLostOnReturnControl.
Comment 2 Nick Clemens (kidclamp) 2025-08-06 15:22:25 UTC
Created attachment 185160 [details] [review]
Bug 39802: Add LostChargesControl system preference
Comment 3 Nick Clemens (kidclamp) 2025-08-06 15:22:28 UTC
Created attachment 185161 [details] [review]
Bug 39802: Use new preference in longoverdue cron

The test plan here is largely confirming that nothing has changed.

Using CircControl here has an existing problem - when set to 'PickupLibrary'
the check in this cron looks for items from the userenv branch - the cron doesn't
have a userenv branch, it is undef, so for any library limiting by branch and
with CircControl set to 'PickupLibrary' / 'the library you are logged in at' the cron will do nothing
Comment 4 Nick Clemens (kidclamp) 2025-08-06 15:22:30 UTC
Created attachment 185162 [details] [review]
Bug 39802: Report when no branches will be selected and exit

This highlights the issue mentioned in the last patch, reporting that
nothign will be done and exiting the script

To test:
1 - perl misc/cronjobs/longoverdue.pl  -l 5=1 --library CPL
2 - Confirm script exits with warning that nothing has been done
Comment 5 Nick Clemens (kidclamp) 2025-08-06 18:02:19 UTC
Created attachment 185165 [details] [review]
Bug 39802: Atomic update file