Koha-clms/admin
Petro Vashchuk 6f28ffbcc5
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, in that case global
ExpireReservesMaxPickUpDelayCharge value will be used).

Mentored-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-30 18:55:22 +01:00
..
searchengine/elasticsearch Bug 36729: Add publisher/distributor number to standard identifier search index 2024-12-27 17:33:53 +01:00
additional-fields.pl Bug 35044: Admin: New additional fields 'repeatable' field 2024-08-23 18:21:20 +02:00
admin-home.pl Bug 36206: (QA follow-up) Tidy admin-home.pl 2024-04-26 14:14:56 +02:00
adveditorshortcuts.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
aqbudgetperiods.pl Bug 36739: Correct CSRF change to budget deletions 2024-05-17 12:03:53 +02:00
aqbudgets.pl Bug 37089: cud-delete_confirm should not be cud 2024-06-21 15:02:48 +02:00
aqcontract.pl Bug 37823: Remove unreachable code in vendor contract page 2024-09-13 13:54:16 +02:00
aqplan.pl Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-14 10:46:31 +01:00
audio_alerts.pl Bug 34478: Manual fix - audio alerts 2024-03-01 10:59:02 +01:00
auth_subfields_structure.pl Bug 37826: Remove the use of the script_name variable where it is unnecessary 2024-12-27 17:33:51 +01:00
auth_tag_structure.pl Bug 37826: Remove the use of the script_name variable where it is unnecessary 2024-12-27 17:33:51 +01:00
authorised_values.pl Bug 28869: (follow-up) Switch to cud-edit_category for CSRF 2024-05-17 10:36:25 +02:00
authtypes.pl Bug 37080: Cannot delete MARC bibliographic frameworks or authority types 2024-06-21 15:02:47 +02:00
background_jobs.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
biblio_framework.pl Bug 37080: Cannot delete MARC bibliographic frameworks or authority types 2024-06-21 15:02:47 +02:00
branch_transfer_limits.pl Bug 34478: Manual fix - add op admin/branch_transfer_limits 2024-03-01 10:57:53 +01:00
branches.pl Bug 6796: Take CalenderFirstDayOfWeek and TimeFormat into account 2024-04-12 11:26:08 +02:00
cash_registers.pl Bug 36193: cud- treatment for cash_registers.pl 2024-03-12 17:47:29 +01:00
categories.pl Bug 33462: (Follow up) Fix Perl Tidy 2024-10-31 13:23:40 +01:00
check_budget_parent.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
check_parent_total.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
checkmarc.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
cities.pl Bug 34478: Cities - Incorrect op check for cud-delete_confirm 2024-03-01 10:59:23 +01:00
classsources.pl Bug 37826: Remove the use of the script_name variable where it is unnecessary 2024-12-27 17:33:51 +01:00
clone-rules.pl Bug 34478: Add 'op' to admin/smart-rules 2024-03-01 10:58:24 +01:00
columns_settings.pl Bug 33484: Clearly separate search and configuration 2024-10-28 17:10:12 +01:00
columns_settings.yml Bug 38954: Hide checkout type using colvis 2025-01-24 12:02:21 +01:00
credit_types.pl Bug 36193: cud- treatment for credit_types.pl 2024-03-12 17:47:29 +01:00
curbside_pickup.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
currency.pl Bug 37511: Location of the currency symbol (before or *after*) the amount 2024-10-30 11:57:26 +01:00
debit_types.pl Bug 36193: cud- treatment for debit_types.pl 2024-03-12 17:47:30 +01:00
desks.pl Bug 36597: Fix deletion of circulation desks broken by CSRF 2024-04-18 16:51:11 +02:00
didyoumean.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
edi_accounts.pl Bug 36767: Add a hint to show the new default of 22 2024-06-27 17:24:42 +02:00
edi_ean_accounts.pl Bug 36995: Correct parameter name for library EAN deletion 2024-06-06 15:18:44 +01:00
identity_providers.pl Bug 36276: Fix editing of identity provider and domains 2024-07-11 13:40:53 +02:00
ill_batch_statuses.pl Bug 35581: Illbatchstatus* -> ILL::Batch::Status* 2024-04-22 08:57:42 +02:00
import_export_authtype.pl Bug 34478: import_export_authtype - cud-import, export 2024-03-01 11:00:01 +01:00
import_export_framework.pl Bug 34478: Rename action with op - import_export_framework 2024-03-01 10:56:49 +01:00
item_circulation_alerts.pl Bug 34478: Fix op variable in item circulation alerts 2024-03-01 10:59:31 +01:00
items_search_field.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
items_search_fields.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
itemtypes.pl Bug 38630: (QA follow-up) Fixing few calls of getTranslatedLanguages 2025-01-30 18:05:25 +01:00
koha2marclinks.pl Bug 34478: Changes for admin/koha2marclinks 2024-03-01 10:57:44 +01:00
library_groups.pl Bug 35402: Update the OPAC and staff interface to Bootstrap 5 2024-08-23 15:58:41 +02:00
localization.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
marc-overlay-rules.pl Bug 36880: Record overlay rules are not validated 2024-06-27 11:50:06 +02:00
marc_order_accounts.pl Bug 34355: (QA follow-up) Migrate vendor dropdown to a kohaSelect 2024-11-11 17:43:16 +01:00
marc_subfields_structure.pl Bug 37826: Remove the use of the script_name variable where it is unnecessary 2024-12-27 17:33:51 +01:00
marctagstructure.pl Bug 37826: Remove the use of the script_name variable where it is unnecessary 2024-12-27 17:33:51 +01:00
matching-rules.pl Bug 37826: Remove the use of the script_name variable where it is unnecessary 2024-12-27 17:33:51 +01:00
oai_servers.pl Bug 37826: Remove the use of the script_name variable where it is unnecessary 2024-12-27 17:33:51 +01:00
oai_set_mappings.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
oai_sets.pl Bug 34478: Corrections to add and delete of OAI sets 2024-03-01 10:59:34 +01:00
overdrive.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
patron-attr-types.pl Bug 37826: Remove the use of the script_name variable where it is unnecessary 2024-12-27 17:33:51 +01:00
preferences.pl Bug 38630: (QA follow-up) Fixing few calls of getTranslatedLanguages 2025-01-30 18:05:25 +01:00
record_sources.pl Bug 35919: Add record sources admin page 2024-04-26 17:06:04 +02:00
restrictions.pl Bug 36193: cud- treatment for restrictions.pl 2024-03-12 17:47:31 +01:00
search_filters.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
share_content.pl Bug 34478: op =~ ^cud- in pl/pm - Manual cud-email => email 2024-03-01 10:57:14 +01:00
smart-rules.pl Bug 25711: Add ExpireReservesMaxPickUpDelayCharge to circulation rules 2025-01-30 18:55:22 +01:00
sms_providers.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
smtp_servers.pl Bug 34478: Correct value of "op" when loading the edit form. 2024-03-01 10:59:36 +01:00
sru_modmapping.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
systempreferences.pl Bug 38630: (QA follow-up) Fixing few calls of getTranslatedLanguages 2025-01-30 18:05:25 +01:00
transfer_limits.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
transport-cost-matrix.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
usage_statistics.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
z3950servers.pl Bug 37826: Remove the use of the script_name variable where it is unnecessary 2024-12-27 17:33:51 +01:00