Bugzilla – Attachment 112483 Details for
Bug 26638
System preference ArticleRequestsMandatoryFieldsItemsOnly is unused
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26638: Remove unused system preference ArticleRequestsMandatoryFieldsItemsOnly
Bug-26638-Remove-unused-system-preference-ArticleR.patch (text/plain), 3.84 KB, created by
Chris Cormack
on 2020-10-25 20:49:42 UTC
(
hide
)
Description:
Bug 26638: Remove unused system preference ArticleRequestsMandatoryFieldsItemsOnly
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2020-10-25 20:49:42 UTC
Size:
3.84 KB
patch
obsolete
>From 1d36de6dcee01e8d051d26b465f6b8409051d59f Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sat, 17 Oct 2020 16:02:55 +0000 >Subject: [PATCH] Bug 26638: Remove unused system preference > ArticleRequestsMandatoryFieldsItemsOnly > >The preference was probably added because of a typo, as there is a >used system preference ArticleRequestsMandatoryFieldsItemOnly >(Item vs Items). > >This patch fixes the situation: > >- syspref.sql had the pref name with the typo, this is fixed. >- A database update removes the unused variable and makes sure > the used one is added. > >To test: >- Look at the local use system preferences, verify the false pref is there >- Look at the other ArticleRequests* preferences, verify the other without "s" > is there >- Apply patch and run database update >- Verify the local use tab one is gone now > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > ...6638_ArticleRequestsMandatoryFieldsItemsOnly.perl | 20 ++++++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > 2 files changed, 21 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_26638_ArticleRequestsMandatoryFieldsItemsOnly.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_26638_ArticleRequestsMandatoryFieldsItemsOnly.perl b/installer/data/mysql/atomicupdate/bug_26638_ArticleRequestsMandatoryFieldsItemsOnly.perl >new file mode 100644 >index 0000000000..a461c96140 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_26638_ArticleRequestsMandatoryFieldsItemsOnly.perl >@@ -0,0 +1,20 @@ >+$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" ); >+ >+ # or perform some test and warn >+ # if( !column_exists( 'biblio', 'biblionumber' ) ) { >+ # warn "There is something wrong"; >+ # } >+ >+ # Always end with this (adjust the bug info) >+ $dbh->do(q{ >+ INSERT IGNORE INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES >+ ('ArticleRequestsMandatoryFieldsItemOnly', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''item_only''', 'multiple') >+ }); >+ $dbh->do(q{ >+ DELETE FROM systempreferences WHERE variable = "ArticleRequestsMandatoryFieldsItemsOnly" >+ }); >+ NewVersion( $DBversion, 26638, "Add missing system preference ArticleRequestsMandatoryFieldsItemOnly"); >+} >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 890dfcfe8f..93a04c615f 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -57,7 +57,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'), > ('ArticleRequestsLinkControl', 'calc', 'always|calc', 'Control display of article request link on search results', 'Choice'), > ('ArticleRequestsMandatoryFields', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''yes''', 'multiple'), >-('ArticleRequestsMandatoryFieldsItemsOnly', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''item_only''', 'multiple'), >+('ArticleRequestsMandatoryFieldsItemOnly', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''item_only''', 'multiple'), > ('ArticleRequestsMandatoryFieldsRecordOnly', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''bib_only''', 'multiple'), > ('AudioAlerts','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), > ('AuthDisplayHierarchy','0','','Display authority hierarchies','YesNo'), >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26638
:
111945
|
112483
|
112894