https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25711
Peter Vashchuk <stalkern...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #107407|0 |1 is obsolete| | --- Comment #5 from Peter Vashchuk <stalkern...@gmail.com> --- Created attachment 107683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107683&action=edit Bug 25711: add ExpireReservesMaxPickUpDelayCharge to circulation rules Add a feature that allows to define ExpireReservesMaxPickUpDelayCharge in circulation rules per specific items/patron categories. When value not found in circulation rules it uses global ExpireReservesMaxPickUpDelayCharge, as it was before this smart-rules feature was introduced. To check the feature after applying the patch: 1) Go to /cgi-bin/koha/admin/preferences.pl and set ExpireReservesMaxPickUpDelay to allow. 1) Go to /cgi-bin/koha/admin/smart-rules.pl circulation rules table and notice the newly added "Expire reserve charge" row. 2) In that row add numerical values to type/patron categories that you will be using later to test this feature. 3) Prepare an item for our next step, pick a biblio that has item with the same item type you altered in smart rules and check it out. 3) Place a hold on that item and set the expiration date as the next day. 4) Check in it after that. 5) Do SQL request to change expiration date manually to "yesterday": in "reserves" table, find the id of the hold that you placed and "UPDATE reserves SET `expirationdate`='2020-07-19' WHERE `reserve_id`=329;" Or alternatively: 5) Wait for tomorrow, change server time or invent a time machine. 6) Run cancel_expired_holds.pl cron job. 7) Check that patron got charged in "accounting" left tab and "transactions" upper tab: your patron should have debt of that amount of fee you assigned in that rule (/cgi-bin/koha/members/boraccount.pl?borrowernumber=...YourPatronID...) 8) You can repeat this with other rules and different numbers/biblio/item types to check that different fees apply according to smart rules. 9) If there's no matching smart rule or smart rule have an empty string as a fee - global ExpireReservesMaxPickUpDelayCharge variable value will be used. 10) But in case if matching rule has zero ("0") as a value - that allows to have no-fee smart-rule results, as a feature. IMPORTANT: Smart-rules filters only applied to item-level holds, when item-type for items is known. If there's biblio-level hold, then again global ExpireReservesMaxPickUpDelayCharge value will be used (as well global one can be empty or zero). Mentored-by: Andrew Nugged <nug...@gmail.com> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/