Bugzilla – Attachment 100937 Details for
Bug 22823
Koha::Library needs a method for obtaining the inbound email address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22823: return undef if KohaAdminEmailAddress not exist
Bug-22823-return-undef-if-KohaAdminEmailAddress-no.patch (text/plain), 2.33 KB, created by
Jonathan Druart
on 2020-03-18 09:48:59 UTC
(
hide
)
Description:
Bug 22823: return undef if KohaAdminEmailAddress not exist
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-18 09:48:59 UTC
Size:
2.33 KB
patch
obsolete
>From f70bad49f01213faa922c898513c0de7ed5cabd3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 18 Mar 2020 10:35:52 +0100 >Subject: [PATCH] Bug 22823: return undef if KohaAdminEmailAddress not exist > >I have the feeling that we should return undef here, but can be ignored >if someone disagrees. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/Library.pm | 3 ++- > t/db_dependent/Koha/Libraries.t | 9 ++++++--- > 2 files changed, 8 insertions(+), 4 deletions(-) > >diff --git a/Koha/Library.pm b/Koha/Library.pm >index 697c745c5b..b3f763a9ef 100644 >--- a/Koha/Library.pm >+++ b/Koha/Library.pm >@@ -80,7 +80,8 @@ sub inbound_email_address { > $self->branchreplyto > || $self->branchemail > || C4::Context->preference('ReplytoDefault') >- || C4::Context->preference('KohaAdminEmailAddress'); >+ || C4::Context->preference('KohaAdminEmailAddress') >+ || undef; > } > > =head3 library_groups >diff --git a/t/db_dependent/Koha/Libraries.t b/t/db_dependent/Koha/Libraries.t >index 478388917b..5b44ea552d 100644 >--- a/t/db_dependent/Koha/Libraries.t >+++ b/t/db_dependent/Koha/Libraries.t >@@ -454,7 +454,7 @@ subtest '->get_effective_marcorgcode' => sub { > > subtest '->inbound_email_address' => sub { > >- plan tests => 4; >+ plan tests => 5; > > $schema->storage->txn_begin; > >@@ -482,10 +482,13 @@ subtest '->inbound_email_address' => sub { > is( $library_1->inbound_email_address, 'reply@mylibrary.com', > 'Fallback to ReplytoDefault email address when branchreplyto and branchemail are undefined'); > >- t::lib::Mocks::mock_preference( 'ReplytoDefault', undef ); >+ t::lib::Mocks::mock_preference( 'ReplytoDefault', '' ); > is( $library_1->inbound_email_address, 'admin@mylibrary.com', >- 'Fallback to KohaAdminEmailAddress email address when branchreplyto, branchemail and eplytoDefault are undefined'); >+ 'Fallback to KohaAdminEmailAddress email address when branchreplyto, branchemail and ReplytoDefault are undefined'); > >+ t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', '' ); >+ is( $library_1->inbound_email_address, undef, >+ 'Return undef when email address when branchreplyto, branchemail, ReplytoDefault and KohaAdminEmailAddress are undefined'); > $schema->storage->txn_rollback; > }; > >-- >2.20.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 22823
:
99539
|
99554
|
99555
|
99726
|
99728
|
100934
|
100935
|
100936
| 100937