David Cook
5d7a9395fb
This patch changes CanBookBeRenewed so that automatic renewal errors pop up before other renewal errors. This means that a book will be considered "auto_too_soon" before things like "too_many" or "restricted". (Otherwise, you'll get an email saying you can't renew a book the day after using your last auto renewal, even though the earliest renewal isn't available until later.) Test plan: 0. Apply patch 1. prove t/db_dependent/Circulation.t 2. prove t/db_dependent/Holds.t 3. prove t/db_dependent/Koha/Account/Line.t 4. prove t/db_dependent/Koha/Account.t Additional tests: 5. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RestrictionBlockRenewing 6. Change to "block" 7. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=AutoRenewalNotices 8. Change to "according to patron messaging preferences" 9. Go to http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl 10. Set "Automatic renewal" to "Yes" and "No renewal before" to 4 11. Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51 12. Checkout 39999000001310 with a due date 4 days in the future 13. Add a manual restriction 14. Run `perl ./misc/cronjobs/automatic_renewals.pl` 15. Note that it says something like the following: Issue id: 1237 for borrower: 51 and item: 73 would not be renewed. (auto_too_soon) Instead of something like the following: Issue id: 1237 for borrower: 51 and item: 73 would not be renewed. (restriction) Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> |
||
---|---|---|
.. | ||
AuthoritiesMarc | ||
Barcodes | ||
ClassSortRoutine | ||
ClassSplitRoutine | ||
Creators | ||
External | ||
Form | ||
Heading | ||
ILSDI | ||
Installer | ||
Labels | ||
Linker | ||
Members | ||
OAI | ||
Output | ||
Patroncards | ||
Reports | ||
Search | ||
Serials | ||
SIP | ||
Utils/DataTables | ||
Accounts.pm | ||
Acquisition.pm | ||
Auth.pm | ||
Auth_cas_servers.yaml.sample | ||
Auth_with_cas.pm | ||
Auth_with_ldap.pm | ||
Auth_with_shibboleth.pm | ||
AuthoritiesMarc.pm | ||
Barcodes.pm | ||
Biblio.pm | ||
Breeding.pm | ||
Budgets.pm | ||
Calendar.pm | ||
Charset.pm | ||
Circulation.pm | ||
ClassSortRoutine.pm | ||
ClassSource.pm | ||
ClassSplitRoutine.pm | ||
Context.pm | ||
Contract.pm | ||
CourseReserves.pm | ||
Creators.pm | ||
Heading.pm | ||
HoldsQueue.pm | ||
HTML5Media.pm | ||
ImportBatch.pm | ||
ImportExportFramework.pm | ||
InstallAuth.pm | ||
Installer.pm | ||
ItemCirculationAlertPreference.pm | ||
Items.pm | ||
Koha.pm | ||
Labels.pm | ||
Languages.pm | ||
Letters.pm | ||
Linker.pm | ||
Log.pm | ||
MarcModificationTemplates.pm | ||
Matcher.pm | ||
Members.pm | ||
Message.pm | ||
Output.pm | ||
Overdues.pm | ||
Patroncards.pm | ||
Record.pm | ||
Reports.pm | ||
Reserves.pm | ||
Ris.pm | ||
RotatingCollections.pm | ||
Scheduler.pm | ||
Scrubber.pm | ||
Search.pm | ||
Serials.pm | ||
Service.pm | ||
ShelfBrowser.pm | ||
SMS.pm | ||
SocialData.pm | ||
Stats.pm | ||
Suggestions.pm | ||
Tags.pm | ||
Templates.pm | ||
TmplToken.pm | ||
TmplTokenType.pm | ||
TTParser.pm | ||
UsageStats.pm | ||
XISBN.pm | ||
XSLT.pm |