Bug 39595

Summary: Allow membership_expiry.pl to limit based on patron attribute
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: Command-line UtilitiesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: robin
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31787
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Andrew Fuerste-Henry 2025-04-09 18:33:42 UTC
The membership_expiry cron can take a "WHERE" value to check against the borrowers table in order to limit who gets renewed/notified (like "where categorycode != 'STAFF'").

It'd be helpful to have a way to check a patron attribute here, too. Maybe we could add options to the cron for "-attribute_code" and "-attribute_value" to limit only to patrons who have an attribute that matches the code and value?

This is technically possible with the current WHERE implementation: -where 'me.borrowernumber in (select borrowernumber from borrower_attributes where code="show_bcode" and attribute=1)'

But making is an explicit option would be more clear.