Koha/installer/data/mysql
Tomas Cohen Arazi 34acb76a21 Bug 27069: Update existing rules
This patch adds an atomic update file that takes care of translating
existing rules. It constrains the rules to translate to those currently
expected by Koha and leaves any other value out.

To test:
1. Have some manually added rules:
   $ koha-mysql kohadev
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', -1);
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', 1);
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', 2);
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', 3);
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', 0);
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', 4);
2. Apply this patch
3. Run:
   $ updatedatabase
=> SUCCESS: It doesn't explode
4. Verify the created rules were updated correctly:
   > SELECT * FROM circulation_rules WHERE rule_name='holdallowed';
5: Verify all the tests that dealt with this rule still pass!
   $ kshell
  k$ git diff origin/master --name-only | grep -e '\.t$' | \
         xargs prove
=> SUCCESS: Tests pass!
6. Verify the UI handles setting things correctly
7. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-07 16:08:04 +02:00
..
atomicupdate Bug 27069: Update existing rules 2021-04-07 16:08:04 +02:00
en Bug 28047: (QA follow-up) Fix a few more Callnumber entries 2021-04-06 15:56:31 +02:00
fr-CA Bug 18532: (follow-up) fix messages and bug in automatic_renewals script 2021-03-16 16:08:31 +01:00
fr-FR Bug 18532: (follow-up) fix messages and bug in automatic_renewals script 2021-03-16 16:08:31 +01:00
it-IT Bug 18532: Add missing notice template for it-IT 2021-03-17 08:23:10 +01:00
localization Bug 27822: Fix default value for AddressFormat (es-ES) 2021-03-03 11:57:51 +01:00
mandatory Bug 26498: Set default expiration date for holds 2021-04-07 13:10:31 +02:00
nb-NO Bug 18532: (follow-up) fix messages and bug in automatic_renewals script 2021-03-16 16:08:31 +01:00
pl-PL Bug 18532: (follow-up) fix messages and bug in automatic_renewals script 2021-03-16 16:08:31 +01:00
ru-RU Bug 18532: (follow-up) fix messages and bug in automatic_renewals script 2021-03-16 16:08:31 +01:00
uk-UA Bug 18532: (follow-up) fix messages and bug in automatic_renewals script 2021-03-16 16:08:31 +01:00
backfill_statistics.pl Bug 13795: Remove occurences of unused columns in code 2019-04-18 10:05:51 +00:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
kohastructure.sql Bug 26057: Add datecancelled, cancellation_reason fields 2021-03-03 15:36:13 +01:00
labels_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
patroncards_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
update22to30.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
updatedatabase.pl Bug 27835: DBRev 20.12.00.025 2021-03-18 15:04:47 +01:00