Bug 32450: Update db to add noissuescharge flag and remove sysprefs
authorMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Fri, 6 Jan 2023 13:52:32 +0000 (13:52 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 17 May 2023 13:25:05 +0000 (10:25 -0300)
commit8c6da2a2c994aa695b875d557e2628e91491bd7f
tree51aa86d5101da676ee070856da8c4faf835b6fae
parentf4610959094956f63d9c117715d728f7982ace1d
Bug 32450: Update db to add noissuescharge flag and remove sysprefs

This commit updates the database to add a new flag to show which debit_types are
included in noissuescharge. It also deletes the current sysprefs that are
hardcoded for this as these are now redundant.

Test plan:
1) Choose a patron and add some fines to this patron that have different debit_types
2) Navigate to system preferences and observe that currently you can only amend the
   noissuescharge included debit types using three preferences: ManInvInNoissuesCharge,
   RentalsInNoissuesCharge, HoldsInNoissuesCharge
3) Apply both commits attached to this bug
4) Navigate as above and observe that these three system preferences are now gone
5) Navigate to Debit Types in System Preferences, the table should have a column
   called No issues charge that shows whether a debit_type is Included or Not included
6) Click the edit button and there should be a checkbox for Included in noissuescharge
7) Change some of the debit_types using this option and observe that the patron you
   added fines to will either be blocked from checkouts or able to checkout depending
   on which debit_types you include and the value of these fines.

Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl [new file with mode: 0644]
installer/data/mysql/kohastructure.sql
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref