Koha-clms/admin
Nick Clemens 039adae9aa Bug 26529: Define some rules as not able to be blank
Currently, the 'Default checkout, hold, and return policy' have a conditional to blank
'holdallowed' when not set, but other rules don't get the same treatment

This patch uses the existing hash that controls the scope of rules and adds a
new parameter 'can_be_blank' Default is assumed to be true, can_be_blank, but if set to '0' then
blank rule values will not be save to the database

To test:
 0 - Set CircControl to 'the library the item is from'
 1 - Goto to Admin -> Circulation and fines rules and select a library
 2 - Under "Default checkout, hold, and return policy" set:
    Total current checkouts allowed: 1
    Hold policy: Not set
    Hold pickup library match: Not set
    Return policy: Not set
 3 - Save the rule
 4 - Check the DB
    SELECT * FROM circulation_rules WHERE branchcode = 'BRANCHCODE'
    using the branchcode for the library you chode
 5 - Note returnbranch, and hold_fulfillment_policy rules exist with blank value
 6 - Set 'All libraries'->'Default checkout, hold and return policy'->'Item floats'
 7 - Checkin an item from the library with blank rules at another library
 8 - It returns home rather than floating
 9 - Apply patch and restart all the things
10 - Reload the page and save the rules as before
11 - Check the DB and note the rules no longer exist
12 - Check in the item, it floats!
13 - prove -v t/db_dependent/Koha/CirculationRules.t

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 13:06:59 +02:00
..
searchengine/elasticsearch Bug 24807: Add "year" type to improve sorting behaviour 2020-09-18 11:21:31 +02:00
add_user_search.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
additional-fields.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
admin-home.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
adveditorshortcuts.pl Bug 24663: Force auth in adveditorshortcuts.pl 2020-09-03 10:40:35 +02:00
aqbudgetperiods.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
aqbudgets.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
aqcontract.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
aqplan.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
audio_alerts.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
auth_subfields_structure.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
auth_tag_structure.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
authorised_values.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
authtypes.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
background_jobs.pl Bug 22417: Remove list of pending jobs 2020-10-05 15:26:36 +02:00
biblio_framework.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
branch_transfer_limits.pl Bug 14391: Add granular permissions to the administration module 2018-11-07 12:29:32 +00:00
branches.pl Bug 22343: Allow choosing an SMTP server in branches.pl 2020-10-02 10:54:41 +02:00
cash_registers.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
categories.pl Bug 23816: Add minimum password length and require strong password overrides by category 2020-09-09 15:39:52 +02:00
check_budget_parent.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
check_parent_total.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
checkmarc.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
cities.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
classsources.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
clone-rules.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
columns_settings.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
columns_settings.yml Bug 25776: Add a 'last updated' column for notices 2020-10-01 10:32:15 +02:00
credit_types.pl Bug 24663: (follow-up) Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
currency.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
debit_types.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
desks.pl Bug 13881: (QA follow-up) Check for manage_libraries permission 2020-03-25 09:19:34 +00:00
didyoumean.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
edi_accounts.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
edi_ean_accounts.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
import_export_framework.pl Bug 23398: Disable the XML import/export format for biblio framework 2019-11-08 12:51:16 +00:00
item_circulation_alerts.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
items_search_field.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
items_search_fields.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
itemtypes.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
koha2marclinks.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
library_groups.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
localization.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
marc_subfields_structure.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
marctagstructure.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
matching-rules.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
oai_set_mappings.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
oai_sets.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
overdrive.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
patron-attr-types.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
preferences.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
share_content.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
smart-rules.pl Bug 26529: Define some rules as not able to be blank 2020-10-09 13:06:59 +02:00
sms_providers.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
smtp_servers.pl Bug 26290: Display the correct default values on the admin page 2020-10-02 15:27:18 +02:00
sru_modmapping.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
systempreferences.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
transport-cost-matrix.pl Bug 26510: Transport Cost Matrix editor doesn't show all data when HoldsQueueSkipClosed is enabled 2020-09-28 10:10:02 +02:00
usage_statistics.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
z3950servers.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00