]> git.koha-community.org Git - koha.git/commit
Bug 22679: Delete related CirculationRules when Removing IssuingRule
authorNick Clemens <nick@bywatersolutions.com>
Tue, 23 Apr 2019 14:17:58 +0000 (14:17 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 24 Apr 2019 10:35:38 +0000 (10:35 +0000)
commitd8a759162cde8f373ea945a7e509102ec81878e0
tree06d0a96dba97fc2fc868dcecac8b068c758a119d
parentd9ce1567937de5fe115ec8595db63b7cfe80d8d6
Bug 22679: Delete related CirculationRules when Removing IssuingRule

Unfortunately, the tables here can't use a foreign key as one table uses null where the other uses
'*' This patchset alters the delete method so delete related rules. It is somewhat of a workaround until
all the columns in issuingrules are moved to circulation_rules

To test:
1 - Add some issuing rules in koha, making sure to set maxissueqty
2 - Check the DB: SELECT * FROM circulation_rules;
3 - note some circulation rules were created
4 - Delete your rules via the staff interface
5 - Check the DB, the circulation rules remain
6 - Apply patch
7 - Repeat
8 - Huzzah! The rules delete!
9 - Prove the tests, read the code

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/CirculationRules.pm
Koha/IssuingRule.pm
admin/smart-rules.pl
t/db_dependent/Koha/CirculationRules.t
t/db_dependent/Koha/IssuingRules.t