[Koha-bugs] [Bug 22823] New: Koha::Library needs a method for obtaining the incoming email address
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu May 2 08:39:59 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22823
Bug ID: 22823
Summary: Koha::Library needs a method for obtaining the
incoming email address
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: koha-bugs at lists.koha-community.org
Reporter: martin.renvoize at ptfs-europe.com
QA Contact: testopia at bugs.koha-community.org
Target Milestone: ---
There's a code pattern emerging (in bug 5770 and bug 22821 at least to my
knowledge) where we grab a branches email address to send notifications to the
branch.
However, it's prone to make mistakes in the fallback order for assigning that
address so we should factor it out into a method that can be called from
Koha::Library.
Should be as simple as
>sub to_email {
> my $self = shift;
> return $self->branchreplyto || $self->branchemail || C4::Context->preference('ReplytoDefault') || C4::Context->preference('KohaAdminEmailAddress');
>}
along with some appropriate POD and a walk of the codebase to replace existing
occurrences of the pattern.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list