Bugzilla – Attachment 154002 Details for
Bug 34438
OPAC self registration form does not include lang (preferred language for notices) field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34438: Add lang to borrower_modification table
Bug-34438-Add-lang-to-borrowermodification-table.patch (text/plain), 2.41 KB, created by
Lucas Gass (lukeg)
on 2023-07-27 20:48:04 UTC
(
hide
)
Description:
Bug 34438: Add lang to borrower_modification table
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-07-27 20:48:04 UTC
Size:
2.41 KB
patch
obsolete
>From 5fb88e20b1af1606bbb6d20db7e1e48fc5a0d970 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 27 Jul 2023 20:42:36 +0000 >Subject: [PATCH] Bug 34438: Add lang to borrower_modification table > >To test: >1. Install a language pack ( sudo koha-translate -i es-ES ) >2. Turn on the system preference TranslateNotices >3. The lang field now appears when registering a patron from the staff interface but not on the OPAC self registration form. >4. Apply patch, updatedatabase, restart_all >5. Go to the OPAC self reg form and notice the Preferred language for notices: >6. Use the PatronSelfRegistrationBorrowerUnwantedField and PatronSelfRegistrationBorrowerMandatoryField to make sure you can make the field requied/hidden. >7. Login to the OPAC and go to patron details, make sure you can modify the Preferred language for notices field successfully. >--- > Koha/Schema/Result/BorrowerModification.pm | 8 ++++++++ > installer/data/mysql/atomicupdate/bug_34438.pl | 14 ++++++++++++++ > 2 files changed, 22 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_34438.pl > >diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm >index 4e58afdbd8..090f9ecbdc 100644 >--- a/Koha/Schema/Result/BorrowerModification.pm >+++ b/Koha/Schema/Result/BorrowerModification.pm >@@ -441,6 +441,12 @@ data processing consent > is_nullable: 1 > size: 45 > >+=head2 lang >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 25 >+ > useful for reporting purposes > > =cut >@@ -621,6 +627,8 @@ __PACKAGE__->add_columns( > }, > "primary_contact_method", > { data_type => "varchar", is_nullable => 1, size => 45 }, >+ "lang", >+ { data_type => "varchar", is_nullable => 1, size => 25 }, > ); > > =head1 PRIMARY KEY >diff --git a/installer/data/mysql/atomicupdate/bug_34438.pl b/installer/data/mysql/atomicupdate/bug_34438.pl >new file mode 100755 >index 0000000000..af9012eb23 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_34438.pl >@@ -0,0 +1,14 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "34438", >+ description => "Add lang to to the borrower_modifications table", >+ up => sub { >+ my ($args) = @_; >+ my $dbh = $args->{dbh}; >+ >+ if( !column_exists( 'borrower_modifications', 'lang' ) ) { >+ $dbh->do( "ALTER TABLE `borrower_modifications` ADD COLUMN `lang` VARCHAR(25) DEFAULT NULL AFTER `primary_contact_method`" ); >+ } >+ }, >+} >-- >2.30.2
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 34438
:
154001
|
154002
|
155775
|
155776
|
158152
|
158153
|
158154
|
158155
|
158156
|
158157
|
158158
|
158159
|
158181
|
158182
|
158183
|
158184
|
158196
|
158197
|
158198
|
158199