Bugzilla – Attachment 135189 Details for
Bug 21978
Add middle name field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21978: Add middle_name to sysprefs.sql
Bug-21978-Add-middlename-to-sysprefssql.patch (text/plain), 4.02 KB, created by
Jonathan Druart
on 2022-05-19 05:32:35 UTC
(
hide
)
Description:
Bug 21978: Add middle_name to sysprefs.sql
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-05-19 05:32:35 UTC
Size:
4.02 KB
patch
obsolete
>From d44663c2689d902cfe3dcc52ade5f1a7b6d6300b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 19 May 2022 07:28:50 +0200 >Subject: [PATCH] Bug 21978: Add middle_name to sysprefs.sql > >And add middle_name at the exact same places for installations with the >default value. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > installer/data/mysql/atomicupdate/bug_21978.pl | 9 +++++++-- > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > 2 files changed, 8 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_21978.pl b/installer/data/mysql/atomicupdate/bug_21978.pl >index 42d109ef8a4..fdc432fd0fa 100755 >--- a/installer/data/mysql/atomicupdate/bug_21978.pl >+++ b/installer/data/mysql/atomicupdate/bug_21978.pl >@@ -37,9 +37,14 @@ return { > my ($default_patron_search_fields) = $dbh->selectrow_array( q{ > SELECT value FROM systempreferences WHERE variable='DefaultPatronSearchFields'; > }); >- my @default_patron_search_fields = split(',',$default_patron_search_fields); >+ my @default_patron_search_fields = split(',', $default_patron_search_fields); > unless( grep /middle_name/, @default_patron_search_fields ){ >- if( grep /firstname/, @default_patron_search_fields ){ >+ if ( $default_patron_search_fields eq 'firstname,surname,othernames,cardnumber,userid' ) { >+ $dbh->do(q{ >+ UPDATE systempreferences SET value=? WHERE variable='DefaultPatronSearchFields' >+ }, undef, 'firstname,middle_name,surname,othernames,cardnumber,userid'); >+ say $out "Added middle name to DefaultPatronSearchFields"; >+ } elsif( grep /firstname/, @default_patron_search_fields ){ > push @default_patron_search_fields,'middle_name'; > my $new_patron_search_fields = join(',',@default_patron_search_fields); > $dbh->do(q{ >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 581e6be18ba..4ce28687301 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -169,7 +169,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('DefaultLongOverdueChargeValue', '', NULL, "Charge a lost item to the borrower's account when the LOST value of the item changes to n.", 'integer'), > ('DefaultLongOverdueDays', '', NULL, "Set the LOST value of an item when the item has been overdue for more than n days.", 'integer'), > ('DefaultLongOverdueLostValue', '', NULL, "Set the LOST value of an item to n when the item has been overdue for more than defaultlongoverduedays days.", 'integer'), >-('DefaultPatronSearchFields', 'firstname,surname,othernames,cardnumber,userid',NULL,'Comma separated list defining the default fields to be used during a patron search using the "standard" option. If empty Koha will default to "firstname,surname,othernames,cardnumber,userid". Additional fields added to this preference will be added as search options in the dropdown menu on the patron search page.','free'), >+('DefaultPatronSearchFields', 'firstname,middle_name,surname,othernames,cardnumber,userid',NULL,'Comma separated list defining the default fields to be used during a patron search using the "standard" option. If empty Koha will default to "firstname,surname,othernames,cardnumber,userid". Additional fields added to this preference will be added as search options in the dropdown menu on the patron search page.','free'), > ('DefaultSaveRecordFileID','biblionumber','biblionumber|controlnumber','Defines whether the advanced cataloging editor will use the bibliographic record number or control number field to populate the name of the save file','Choice'), > ('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'), > ('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'), >-- >2.25.1
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 21978
:
133431
|
133432
|
133433
|
133434
|
133435
|
133436
|
133437
|
133438
|
133453
|
133454
|
133455
|
133456
|
133534
|
133535
|
133536
|
133537
|
133544
|
133545
|
133546
|
133547
|
133751
|
133752
|
133753
|
133754
|
133755
|
133756
|
133757
|
134254
|
134255
|
134256
|
134257
|
134258
|
134259
|
134495
|
134497
|
134498
|
134499
|
134500
|
134501
|
134502
|
134503
|
134745
|
134746
|
134747
|
134748
|
134749
|
134750
|
134751
|
135147
|
135148
|
135149
|
135150
|
135151
|
135152
|
135153
|
135154
|
135155
|
135180
|
135181
|
135182
|
135183
|
135184
|
135185
|
135186
|
135187
|
135188
|
135189
|
136513
|
136514
|
136515
|
136516
|
136517
|
136518
|
136519
|
136520
|
136521
|
136522
|
137612