Bugzilla – Attachment 99728 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: Add get_effective_email method to Koha::Library
Bug-22823-Add-geteffectiveemail-method-to-KohaLibr.patch (text/plain), 1.64 KB, created by
Bernardo Gonzalez Kriegel
on 2020-02-27 23:54:34 UTC
(
hide
)
Description:
Bug 22823: Add get_effective_email method to Koha::Library
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2020-02-27 23:54:34 UTC
Size:
1.64 KB
patch
obsolete
>From cb3924559f52d5de467f719e56d7989c822f76a3 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 24 Feb 2020 20:42:30 +0000 >Subject: [PATCH] Bug 22823: Add get_effective_email method to Koha::Library > >Add a `get_effective_email` method to the Koha::Library object which >returns the email address for the library which they are most likely to >have access to. > >This method falls back through preferences `branchreplyto`, `branchemail`, >`ReplytoDefault`, `KohaAdminEmailAddress`. > >This bug simply introduces a new utility function to return the most effective email address for a branch to be emailed on. > >Test plan >1/ Read the new test and verify it makes sense >2/ Run the tests and verify they all pass. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Tests seems ok and test pass Ok. >--- > Koha/Library.pm | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > >diff --git a/Koha/Library.pm b/Koha/Library.pm >index 1d0dc1ccaf..29db17d7db 100644 >--- a/Koha/Library.pm >+++ b/Koha/Library.pm >@@ -65,6 +65,24 @@ sub get_effective_marcorgcode { > return $self->marcorgcode || C4::Context->preference("MARCOrgCode"); > } > >+=head3 get_effective_email >+ >+ my $to_email = Koha::Library->get_effective_email; >+ >+Returns an effective email address which should be accessible to librarians at the branch. >+ >+=cut >+ >+sub get_effective_email { >+ my ($self) = @_; >+ >+ return >+ $self->branchreplyto >+ || $self->branchemail >+ || C4::Context->preference('ReplytoDefault') >+ || C4::Context->preference('KohaAdminEmailAddress'); >+} >+ > =head3 library_groups > > Return the Library groups of this library >-- >2.17.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