Bug 26500 - Automatic renewals show incorrect count of renewals allowed when CircControl is set to "the library you're logged in at"
Summary: Automatic renewals show incorrect count of renewals allowed when CircControl ...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-21 12:22 UTC by Andrew Fuerste-Henry
Modified: 2023-12-13 17:20 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2020-09-21 12:22:40 UTC
When CircControl is set to "the library you're logged in at," the Renew column in the patron checkouts table will show the count of permitted renewals based on the library you're logged in at. This is correct for manual renewals, since those are the rules that will be enforced. However, for automatic renewals this can mean we're showing the user an incorrect number.

To recreate:
- Create an All Libraries rule that allows 10 renewals
- Create a rule for branch A that allows 1 renewal
- Creare a rule for branch B that allows 99 renewals
- Check an item out from Branch A, set to auto-renew
- While logged in as Branch A, confirm Koha tells you you have 1 renewal available
- Log in as Branch B, see you have 99 renewals
- Log in as Branch C, see you have 10 renewals
- Set No Renewal Before to allow renewal immediately
- run the auto_renew cron, item renews once
- run the auto-renew cron again, confirm too_many error because only 1 renewal is allowed
Comment 1 Kyle M Hall (khall) 2022-04-06 14:53:21 UTC
I think if circ control is set to logged in library, and the interface AddRenewal is running from is "opac", we should be using issues.branchcode instead of the userenv branch. I think that solves the issue. We should syspref it to retain the existing behavior if wanted.
Comment 2 Kyle M Hall (khall) 2022-04-06 14:54:52 UTC
(In reply to Kyle M Hall from comment #1)
> I think if circ control is set to logged in library, and the interface
> AddRenewal is running from is "opac", we should be using issues.branchcode
> instead of the userenv branch. I think that solves the issue. We should
> syspref it to retain the existing behavior if wanted.

Amend "opac" in this to be "not intranet" and I think it still stands.
Comment 3 Michael Adamyk 2023-10-09 13:50:32 UTC
As we're adding more libraries in our consortium to automatic renewal, this is causing a lot of confusion. +1