https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18783
--- Comment #38 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 211091 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211091&action=edit Bug 18783: (follow-up) Set the claim notice and maximum claims in the staff interface claim_serials.pl needed a server administrator to give it the notice to send and the maximum number of claims on its command line. Like other scripts, it is now configured from the staff interface, in the Serials system preferences: * SerialsClaimLetter: the notice, of the "Claim serial issue" module, to send. The preferences editor gets a "claimissues-letters" source, to offer the email notices of that module in a dropdown. * SerialsMaxClaims: the number of claims after which an issue is not claimed any more, 0 for no limit. It is 3 by default. The script now uses Koha::Script->describe_options. Its --letter-code and --max-claims options are optional and take precedence over the preferences, so that command lines that give them keep working. It stops with a message that says which preference to set when there is no notice, and refuses a negative maximum. Its documentation describes how issues are chosen, and --man shows it. An example line, commented out as the script is opt-in, is added to crontab.example. To test: 1. Apply the patches 2. perl installer/data/mysql/updatedatabase.pl => Added system preference 'SerialsClaimLetter' and 'SerialsMaxClaims' 3. Create a notice of the module "Claim serial issue", email, code CLAIMSERIAL 4. Go to Administration > System preferences > Serials => In Notifications, a dropdown with CLAIMSERIAL, and a number set to 3 5. Choose CLAIMSERIAL, set the number to 2 and save 6. Run misc/cronjobs/claim_serials.pl --help, then --man => The options are described 7. Run misc/cronjobs/claim_serials.pl, with automatic claims enabled on a subscription with a late issue of a supplier that has a delivery time => The issue is claimed with CLAIMSERIAL, and not any more after 2 claims 8. Empty the notice preference and run the script again => It stops and says to set SerialsClaimLetter 9. Run it with --letter-code CLAIMSERIAL => It works whatever the preference 10. Sign off :-D Co-Authored-By: Claude Sonnet 5.5 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
