From 5b54bd1c660c4f50a1bc7b58a245bf4a04e3d6a5 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Tue, 4 Feb 2020 20:05:31 -0300 Subject: [PATCH] Bug 24583: Rewrite mandatory/sample_frequencies to YAML YAML version of mandatory sample_frequencies To test: 1) Same test plan of first patch, only check table subscription_frequencies --- .../mysql/en/mandatory/sample_frequencies.sql | 16 --- .../mysql/en/mandatory/sample_frequencies.txt | 1 - .../mysql/en/mandatory/sample_frequencies.yml | 105 ++++++++++++++++++ 3 files changed, 105 insertions(+), 17 deletions(-) delete mode 100644 installer/data/mysql/en/mandatory/sample_frequencies.sql delete mode 100644 installer/data/mysql/en/mandatory/sample_frequencies.txt create mode 100644 installer/data/mysql/en/mandatory/sample_frequencies.yml diff --git a/installer/data/mysql/en/mandatory/sample_frequencies.sql b/installer/data/mysql/en/mandatory/sample_frequencies.sql deleted file mode 100644 index f09c8a2c1b..0000000000 --- a/installer/data/mysql/en/mandatory/sample_frequencies.sql +++ /dev/null @@ -1,16 +0,0 @@ -INSERT INTO subscription_frequencies - (description, unit, unitsperissue, issuesperunit, displayorder) -VALUES - ('2/day', 'day', 1, 2, 1), - ('1/day', 'day', 1, 1, 2), - ('3/week', 'week', 1, 3, 3), - ('1/week', 'week', 1, 1, 4), - ('1/2 weeks', 'week', 2, 1, 5), - ('1/3 weeks', 'week', 3, 1, 6), - ('1/month', 'month', 1, 1, 7), - ('1/2 months', 'month', 2, 1, 8), - ('1/3 months', 'month', 3, 1, 9), - ('2/year', 'month', 6, 1, 10), - ('1/year', 'year', 1, 1, 11), - ('1/2 year', 'year', 2, 1, 12), - ('Irregular', NULL, 1, 1, 13); diff --git a/installer/data/mysql/en/mandatory/sample_frequencies.txt b/installer/data/mysql/en/mandatory/sample_frequencies.txt deleted file mode 100644 index 8754f46f24..0000000000 --- a/installer/data/mysql/en/mandatory/sample_frequencies.txt +++ /dev/null @@ -1 +0,0 @@ -Sample frequencies for subscriptions diff --git a/installer/data/mysql/en/mandatory/sample_frequencies.yml b/installer/data/mysql/en/mandatory/sample_frequencies.yml new file mode 100644 index 0000000000..2c79763231 --- /dev/null +++ b/installer/data/mysql/en/mandatory/sample_frequencies.yml @@ -0,0 +1,105 @@ +--- +# +# Copyright 2020 Koha Development Team +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +description: + - "Sample frequencies for subscriptions" + +tables: + - subscription_frequencies: + translatable: [ description ] + multiline: [] + rows: + - description: "2/day" + unit: "day" + unitsperissue: 1 + issuesperunit: 2 + displayorder: 1 + + - description: "1/day" + unit: "day" + unitsperissue: 1 + issuesperunit: 1 + displayorder: 2 + + - description: "3/week" + unit: "week" + unitsperissue: 1 + issuesperunit: 3 + displayorder: 3 + + - description: "1/week" + unit: "week" + unitsperissue: 1 + issuesperunit: 1 + displayorder: 4 + + - description: "1/2 weeks" + unit: "week" + unitsperissue: 2 + issuesperunit: 1 + displayorder: 5 + + - description: "1/3 weeks" + unit: "week" + unitsperissue: 3 + issuesperunit: 1 + displayorder: 6 + + - description: "1/month" + unit: "month" + unitsperissue: 1 + issuesperunit: 1 + displayorder: 7 + + - description: "1/2 months" + unit: "month" + unitsperissue: 2 + issuesperunit: 1 + displayorder: 8 + + - description: "1/3 months" + unit: "month" + unitsperissue: 3 + issuesperunit: 1 + displayorder: 9 + + - description: "2/year" + unit: "month" + unitsperissue: 6 + issuesperunit: 1 + displayorder: 10 + + - description: "1/year" + unit: "year" + unitsperissue: 1 + issuesperunit: 1 + displayorder: 11 + + - description: "1/2 year" + unit: "year" + unitsperissue: 2 + issuesperunit: 1 + displayorder: 12 + + - description: "Irregular" + unit: ~ + unitsperissue: 1 + issuesperunit: 1 + displayorder: 13 -- 2.17.1