Bugzilla – Attachment 155776 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.45 KB, created by
David Nind
on 2023-09-18 00:29:23 UTC
(
hide
)
Description:
Bug 34438: Add lang to borrower_modification table
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-09-18 00:29:23 UTC
Size:
2.45 KB
patch
obsolete
>From 2fdce9b8e8950330b9c3fac6f00b19cffca4a0ab 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. > >Signed-off-by: David Nind <david@davidnind.com> >--- > 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