Bug 10994

Summary: Allow use of branch/kohaAdmin e-mail address for sending claim notices
Product: Koha Reporter: Amit Gupta <amitddng135>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: amitddng135, chris, gitbot, indradg, jonathan.druart, katrin.fischer, veron
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5770
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20755
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Email sending is not working in claim notice

Description Amit Gupta 2013-10-04 08:47:03 UTC
From address is null acquisitions claim and serial notice.

my $userenv = C4::Context->userenv;
$userenv->{emailaddress}
Comment 1 Amit Gupta 2013-10-04 08:48:42 UTC
(In reply to Amit from comment #0)
> From address is null acquisitions claim and serial notice.
> 
> my $userenv = C4::Context->userenv;
> $userenv->{emailaddress}

From address contain null value in acquisitions claim and serial notice.
my $userenv = C4::Context->userenv;
$userenv->{emailaddress}
Comment 2 Katrin Fischer 2013-10-04 09:08:25 UTC
It has worked nicely for me in the past - does your staff user have an email address?

I agree that it's unusual for Koha to use the staff patron's email address, so maybe this should only be an option and not the default.
Comment 3 Amit Gupta 2013-10-04 09:24:00 UTC
Hi Katrin,

Yes if staff have an email address claim notice is working fine. But this is not a correct behavior. If we modify the code then it will not check whether staff have email address or not.

my $email_address = $userenv->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress');
Comment 4 Amit Gupta 2013-10-07 04:58:47 UTC
Created attachment 21841 [details] [review]
Email sending is not working in claim notice

Email sending is not working in claim notice.
This patch will not check whether staff patron's email address or not for sending claim notices.
Comment 5 I'm just a bot 2013-10-28 06:25:49 UTC
Patch applied cleanly, go forth and signoff
Comment 6 Chris Cormack 2013-12-22 20:29:34 UTC
This is changing existing behaviour, with no warning, and no option to keep existing behaviour.
Comment 7 Jonathan Druart 2015-02-23 15:59:11 UTC
Amit, do you plan to work again on this one?
Comment 8 Amit Gupta 2015-02-23 16:12:20 UTC
Hi Jonathan Druart,

Yes i have plan will recreate and submit the patch again.
Comment 9 Katrin Fischer 2015-06-07 10:21:04 UTC
As Chris pointed out, we can't change behaviour without warning - best would be to make this optional.
Comment 10 Amit Gupta 2015-06-08 03:28:29 UTC
Thanks Chris & Katrin for suggestion. I will rework & create this feature as a system preference.
Comment 11 Marc VĂ©ron 2016-10-02 15:37:37 UTC
Still valid?
Comment 12 Jonathan Druart 2019-12-11 06:55:12 UTC
Switching from major to new enhancement.
Comment 13 Katrin Fischer 2023-06-06 07:52:13 UTC
I just looked into this for another reason and it looks like we are now using the branchemail / KohaAdminEmailAdress in SendAlerts:

        my $mail = Koha::Email->create(
            {
                to => join( ',', @email ),
                cc => join( ',', @cc ),
                (
                    (
                        C4::Context->preference("ClaimsBccCopy")
                          && ( $type eq 'claimacquisition'
                            || $type eq 'claimissues' )
                    )
                    ? ( bcc => $userenv->{emailaddress} )
                    : ()
                ),
                from => $library->branchemail
                  || C4::Context->preference('KohaAdminEmailAddress'),