Bug 41518 - "Scheduled for automatic renewal" displays even if patron does not allow automatic renewals
Summary: "Scheduled for automatic renewal" displays even if patron does not allow auto...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-05 03:53 UTC by David Cook
Modified: 2026-01-05 04:16 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41518: Only show autorenewal text if autorenewal allowed (4.16 KB, patch)
2026-01-05 04:15 UTC, David Cook
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2026-01-05 03:53:02 UTC
As discussed in bug 36021, the "Scheduled for automatic renewal" displays if the checkout has auto_renew set, but if the patron does not have "autorenew_checkouts", it doesn't make sense to say it's scheduled for automatic renewal, since automatic_renewals.pl won't select checkouts from that borrower.
Comment 1 David Cook 2026-01-05 04:15:46 UTC
Created attachment 190883 [details] [review]
Bug 41518: Only show autorenewal text if autorenewal allowed

This change makes the "Scheduled for automatic renewal" text appear
in the staff interface and OPAC only if both the issue has auto_renew
and the borrower has autorenew_checkouts set. These are the criteria that
automatic_renewals.pl uses for processing automatic renewals.

Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Checkout an item as an automatic renewal
(ie either set it as Automatic renewal using the checkout option or have
 the circ and fines rules set to use Automatic renewals)
3. View the checkout in both the staff interface and the OPAC
4. Note that they both show "Scheduled for automatic renewal" or
"This item is scheduled for auto renewal" for the OPAC
5. In the patron record change "Allow auto-renewal of items" from
"Yes" to "No"
6. Note that the text talking about the item being scheduled
for automatic renewal no longer displays

Bonus points:
1. Run 'perl ./misc/cronjobs/automatic_renewals.pl -v'
2. Note that the automatic renewal doesn't show when "Allow auto-renewal
of items" is set to "No" but it does show when it's set to "Yes"