Bug 15494: Add syspref

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2017-05-24 09:47:34 -04:00
parent 72750cf3b7
commit b170f77d10
3 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,16 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
# you can use $dbh here like:
# $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" );
$dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('ItemsDeniedRenewal','','','This syspref allows to define custom rules for denying renewal of specific items.','Textarea')" );
# or perform some test and warn
# if( !column_exists( 'biblio', 'biblionumber' ) ) {
# warn "There is something wrong";
# }
# Always end with this (adjust the bug info)
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 15494 - Block renewals by arbitrary item values)\n";
}

View File

@ -250,6 +250,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('itemBarcodeFallbackSearch','',NULL,'If set, uses scanned item barcodes as a catalogue search if not found as barcodes','YesNo'),
('itemBarcodeInputFilter','','whitespace|T-prefix|cuecat|libsuite8|EAN13','If set, allows specification of a item barcode input filter','Choice'),
('itemcallnumber','082ab',NULL,'The MARC field/subfield that is used to calculate the itemcallnumber (Dewey would be 082ab or 092ab; LOC would be 050ab or 090ab) could be 852hi from an item record','free'),
('ItemsDeniedRenewal','','','This syspref allows to define custom rules for denying renewal of specific items.','Textarea'),
('KohaAdminEmailAddress','root@localhost','','Define the email address where patron modification requests are sent','free'),
('KohaManualBaseURL','https://koha-community.org/manual/','','Where is the Koha manual/documentation located?','Free'),
('KohaManualLanguage','en','en|ar|cs|de|es|fr|it|pt_BR|tr|zh_TW','What is the language of the online manual you want to use?','Choice'),

View File

@ -476,6 +476,17 @@ Circulation:
yes: Block
no: Allow
- his/her auto renewals.
-
- pref: ItemsDeniedRenewal
type: textarea
class: code
- Define custom rules to deny specific items from renewal.
- "<br />Can name any field in the items table followed by a colon then a space then"
- "a bracketed list of values separated by commas."
- "e.g."
- "<br />ccode: [NEWFIC,NULL,DVD]"
- "<br />itype: [NEWBK,\"\"]"
- "<br /> Note: the word 'NULL' can be used to block renewal on undefined fields, while an empty string \"\" will block on an empty (but defined) field."
Checkin Policy:
-
- pref: HoldsAutoFill