@@ -, +, @@ - File must to be .pl - File must be executable : chmod a+x - Syspref type is 'free' not 'multiple' --- ...8_add_PatronSelfModificationMandatoryField_syspref.pl} | 15 ++++++++++----- installer/data/mysql/mandatory/sysprefs.sql | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) rename installer/data/mysql/atomicupdate/{bug_13188_add_PatronSelfModificationMandatoryField_syspref.perl => bug_13188_add_PatronSelfModificationMandatoryField_syspref.pl} (57%) mode change 100644 => 100755 --- a/installer/data/mysql/atomicupdate/bug_13188_add_PatronSelfModificationMandatoryField_syspref.perl +++ a/installer/data/mysql/atomicupdate/bug_13188_add_PatronSelfModificationMandatoryField_syspref.perl @@ -7,10 +7,15 @@ return { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - $dbh->do(q{ + $dbh->do(q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) - SELECT 'PatronSelfModificationMandatoryField', value, NULL, 'Define the required fields when a patron is editing their information via the OPAC','multiple' - FROM (SELECT value FROM systempreferences WHERE variable="PatronSelfRegistrationBorrowerMandatoryField") tmp - }); + SELECT 'PatronSelfModificationMandatoryField', value, NULL, 'Define the required fields when a patron is editing their information via the OPAC','free' + FROM (SELECT value FROM systempreferences WHERE variable='PatronSelfRegistrationBorrowerMandatoryField') tmp + }); + + my ($syspref_value) = $dbh->selectrow_array(q{ + SELECT value FROM systempreferences WHERE variable='PatronSelfModificationMandatoryField' + }); + say $out "Added new system preference 'PatronSelfModificationMandatoryField' with value '$syspref_value'"; }, -} + } --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -514,7 +514,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'), ('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'), ('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'), -('PatronSelfModificationMandatoryField','',NULL,'Name the fields you don\'t want to be required when a patron is editing their information via the OPAC.','free'), +('PatronSelfModificationMandatoryField','',NULL,'Define the required fields when a patron is editing their information via the OPAC','free'), ('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'), ('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'), ('PatronSelfRegistrationAdditionalInstructions','','','A free text field to display additional instructions to newly self registered patrons.','free'), --