https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10190

--- Comment #271 from Michaela Sieber <[email protected]> ---
There is a fundamental conceptual error in the migration of the overdue rules
with branch code. 
No default rules must be created here, since there were no default rules in the
previous version either. 
The identification of “common” rules is far too simplistic.

Consider the following scenario: Your library has 10 patron categories. 
Branch Centerville: for 6 of these categories, an overdue rule is configured
with delay = 3 and the ODUE letter sent by email. 
However, for the remaining four categories, no rule is configured at all. In
the current version, these four categories therefore do not receive any overdue
notices.
With the migration, you would now create a default rule that would also apply
to these four categories. 
This is incorrect, because we must not make assumptions or create default rules
for other institutions whose specific setup and context we do not know.

Our conclusion is that only explicit rules may be migrated. This applies both
to rules with a branch code and to those without a branch code.

We strongly recommend testing with existing, differing overdue rules. 
For this purpose, we have created ready-to-use SQL insert statements and would
be happy to provide them for testing, so that the various migration scenarios
can be tested more easily.


This is what we've done for testing with KTD:

git checkout main
ktd up
ktd --shell
koha-mysql kohadev

SQL-Insert statements for overduerules and overduerules_transport_types :

INSERT INTO overduerules (overduerules_id, branchcode, categorycode, delay1,
letter1, debarred1, delay2, debarred2, letter2, delay3, letter3, debarred3)
VALUES
(1, '', 'HB', 2, 'ODUE', 0, 4, 0, 'ODUE', 6, 'ODUE', 0),
(2, '', 'B', 1, 'ODUE', 0, 2, 0, 'ODUE', 3, 'ODUE', 1),
(3, '', 'K', 3, 'ODUE', 0, 6, 0, 'ODUE', 9, 'ODUE', 1),
(4, 'LPL', 'K', 5, 'ODUE', 0, 10, 1, 'ODUE', 0, '', 0),
(5, 'LPL', 'ST', 7, 'ODUE', 0, 14, 1, 'ODUE', 0, '', 0),
(6, 'LPL', 'YA', 10, 'ODUE', 0, 20, 1, '', 0, '', 0),
(7, 'SPL', 'SC', 8, 'DUE', 1, 0, 0, '', 0, '', 0);


INSERT INTO overduerules_transport_types 
(id, letternumber, message_transport_type, overduerules_id) VALUES
(1, 1, 'print', 1),
(2, 2, 'print', 1),
(3, 3, 'print', 1),
(4, 1, 'email', 2),
(5, 2, 'email', 2),
(6, 3, 'email', 2),
(7, 3, 'print', 2),
(8, 1, 'email', 3),
(9, 1, 'print', 3),
(10, 2, 'email', 3),
(11, 2, 'print', 3),
(12, 3, 'print', 3),
(13, 1, 'email', 4),
(14, 2, 'print', 4),
(15, 1, 'email', 5),
(16, 2, 'email', 5),
(17, 2, 'print', 5),
(18, 1, 'email', 6);

Now everything is prepared for testing the migration scenario. Check the
overduerule in Koha staff interface before you apply the patch!

# if branch already exists, delete it : git branch -D bug_10190
git checkout -b bug_10190 origin/main
git bz apply 10190
updatedatabase
yarn build
# copies the Apache-Config files to the correct place
sudo perl /kohadevbox/misc4dev/cp_debian_files.pl --instance=kohadev
--koha_dir=/kohadevbox/koha --gitify_dir=/kohadevbox/gitify
restart_all

Check the migrated circulation triggers.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
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/

Reply via email to