Bugzilla – Attachment 148140 Details for
Bug 33192
We should rename 'AutoEmailPrimaryAddress' to 'EmailFieldPrimary' for clarification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33192: Update all occurrences of AutoEmailPrimaryAddress
Bug-33192-Update-all-occurrences-of-AutoEmailPrima.patch (text/plain), 5.18 KB, created by
Caroline Cyr La Rose
on 2023-03-13 19:16:45 UTC
(
hide
)
Description:
Bug 33192: Update all occurrences of AutoEmailPrimaryAddress
Filename:
MIME Type:
Creator:
Caroline Cyr La Rose
Created:
2023-03-13 19:16:45 UTC
Size:
5.18 KB
patch
obsolete
>From 8fe017d3ae6f9a8345301e53d9024691dd335a13 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 13 Mar 2023 14:05:51 +0000 >Subject: [PATCH] Bug 33192: Update all occurrences of AutoEmailPrimaryAddress > >This patch updates all references to AutoEmailPrimaryAddress to refer to >EmailFieldPrimary instead. > >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >--- > C4/UsageStats.pm | 2 +- > Koha/Patron.pm | 2 +- > .../prog/en/modules/admin/preferences/patrons.pref | 2 +- > opac/opac-registration-verify.pl | 2 +- > t/Auth_with_shibboleth.t | 2 +- > t/db_dependent/Koha/Patrons.t | 10 +++++----- > 6 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm >index 7cf2098f49..e638f15490 100644 >--- a/C4/UsageStats.pm >+++ b/C4/UsageStats.pm >@@ -326,7 +326,7 @@ sub _shared_preferences { > PatronSelfRegistration > OPACShelfBrowser > AutoEmailNewUser >- AutoEmailPrimaryAddress >+ EmailFieldPrimary > autoMemberNum > BorrowerRenewalPeriodBase > EnableBorrowerFiles >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 9282b38307..fa722a846e 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1400,7 +1400,7 @@ Returns the empty string if no email address. > sub notice_email_address{ > my ( $self ) = @_; > >- my $which_address = C4::Context->preference("AutoEmailPrimaryAddress"); >+ my $which_address = C4::Context->preference("EmailFieldPrimary"); > # if syspref is set to 'first valid' (value == OFF), look up email address > if ( $which_address eq 'OFF' ) { > return $self->first_valid_email_address; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 685a09b2e6..64ead0d699 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -174,7 +174,7 @@ Patrons: > - email receipts to patrons for payments and writeoffs. > - > - "Use" >- - pref: AutoEmailPrimaryAddress >+ - pref: EmailFieldPrimary > default: "OFF" > choices: > email: home >diff --git a/opac/opac-registration-verify.pl b/opac/opac-registration-verify.pl >index 673507ab3e..e28b38138b 100755 >--- a/opac/opac-registration-verify.pl >+++ b/opac/opac-registration-verify.pl >@@ -87,7 +87,7 @@ if ( > > # If 'AutoEmailNewUser' syspref is on, email user their account details from the 'notice' that matches the user's branchcode. > if ( C4::Context->preference("AutoEmailNewUser") ) { >- # Look up correct email address taking AutoEmailPrimaryAddress into account >+ # Look up correct email address taking EmailFieldPrimary into account > my $emailaddr = $patron->notice_email_address; > # if we manage to find a valid email address, send notice > if ($emailaddr) { >diff --git a/t/Auth_with_shibboleth.t b/t/Auth_with_shibboleth.t >index 2d8958d3bf..121df22869 100755 >--- a/t/Auth_with_shibboleth.t >+++ b/t/Auth_with_shibboleth.t >@@ -419,7 +419,7 @@ sub mockedPref { > $return = $staffClientBaseURL; > } > >- if ( $param eq 'AutoEmailPrimaryAddress' ) { >+ if ( $param eq 'EmailFieldPrimary' ) { > $return = 'OFF'; > } > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index 8684c8aa15..db789467b7 100755 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -1066,11 +1066,11 @@ subtest 'notice_email_address' => sub { > > my $patron = $builder->build_object({ class => 'Koha::Patrons' }); > >- t::lib::Mocks::mock_preference( 'AutoEmailPrimaryAddress', 'OFF' ); >- is ($patron->notice_email_address, $patron->email, "Koha::Patron->notice_email_address returns correct value when AutoEmailPrimaryAddress is off"); >+ t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'OFF' ); >+ is ($patron->notice_email_address, $patron->email, "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is off"); > >- t::lib::Mocks::mock_preference( 'AutoEmailPrimaryAddress', 'emailpro' ); >- is ($patron->notice_email_address, $patron->emailpro, "Koha::Patron->notice_email_address returns correct value when AutoEmailPrimaryAddress is emailpro"); >+ t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'emailpro' ); >+ is ($patron->notice_email_address, $patron->emailpro, "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is emailpro"); > > $patron->delete; > }; >@@ -2230,7 +2230,7 @@ subtest 'queue_notice' => sub { > plan tests => 11; > > my $dbh = C4::Context->dbh; >- t::lib::Mocks::mock_preference( 'AutoEmailPrimaryAddress', 'email' ); >+ t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'email' ); > my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); > my $branch = $builder->build_object( { class => 'Koha::Libraries' } ); > my $letter_e = $builder->build_object( { >-- >2.34.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 33192
:
148118
|
148119
|
148139
|
148140
|
149381
|
149382
|
149383
|
149384