Bug 30694: Set decreaseloanholds undef when deleting circulation rule

When one tries to delete rule with field "Decreased loan period
for high holds" filled, delete fails without errors. This happens
because rule isn't set in code section handling the delete in
smart-rules.pl.

To test:
1. Create a new circulation rule and fill all fields.
2. Try to delete the rule.
=> Rule isn't deleted, all fields except "Decreased loan period
for high holds" are now empty or have value "Unlimited".
3. Modify the rule and set field "Decreased loan period for high
holds" empty.
4. Delete the rule.
=> Rule is deleted successfully.
5. Create a new rule, fill all fields expect field "Decreased loan
period for high holds".
6. Delete the rule.
=> Rule is deleted successfully.
7. Apply this patch.
8. Again create a new rule with field "Decreased loan period for high holds" filled.
9. Try to delete the rule.
=> Rule is deleted successfully.

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 91fc31c32b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 63fd9be98b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bc18581f8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
Emmi Takkinen 2022-11-15 09:31:13 +02:00 committed by Arthur Suzuki
parent 424caa64be
commit 2570fe4f67
No known key found for this signature in database
GPG Key ID: 7558BEE2BEEEBCAA
1 changed files with 1 additions and 0 deletions

View File

@ -109,6 +109,7 @@ if ($op eq 'delete') {
cap_fine_to_replacement_price => undef,
article_requests => undef,
note => undef,
decreaseloanholds => undef,
}
}
);