Bug 20755 - Allow separate email configuration for acquisition and serials emails
Summary: Allow separate email configuration for acquisition and serials emails
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Raphael Straub
QA Contact: Katrin Fischer
URL:
Keywords:
: 18853 (view as bug list)
Depends on:
Blocks: 35457
  Show dependency treegraph
 
Reported: 2018-05-11 12:21 UTC by Katrin Fischer
Modified: 2023-12-01 09:32 UTC (History)
9 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Medium patch
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/757
Text to go in the release notes:
This enhancement adds four new system preferences: - `AcquisitionsDefaultEMailAddress` - `AcquisitionsDefaultReplyTo` - `SerialsDefaultEMailAddress` - `SerialsDefaultReplyTo` These are used to set specific email addresses to send and receive replies to acquisitions orders notices, late orders claims notices and late serial issues claims notices.
Version(s) released in:
23.11.00


Attachments
Bug 20755: Add separate email configuration for acquisition and serial emails (10.26 KB, patch)
2023-10-16 13:38 UTC, Raphael Straub
Details | Diff | Splinter Review
Bug 20755: Add separate email configuration for acquisition and serial emails (10.33 KB, patch)
2023-10-18 08:25 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20755: Add separate email configuration for acquisition and serial emails (10.38 KB, patch)
2023-10-24 15:41 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20755: (QA follow-up) Add unit tests (6.07 KB, patch)
2023-10-24 15:41 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20755: (QA follow-up) Fix capitalization in system preference description (3.07 KB, patch)
2023-10-24 15:41 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20755: (QA follow-up) Add descriptions to system preferences (5.58 KB, patch)
2023-10-25 09:40 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20755: Add separate email configuration for acquisition and serial emails (10.37 KB, patch)
2023-11-02 09:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20755: (QA follow-up) Add unit tests (6.07 KB, patch)
2023-11-02 09:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20755: (QA follow-up) Fix capitalization in system preference description (3.07 KB, patch)
2023-11-02 09:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20755: (QA follow-up) Add descriptions to system preferences (5.57 KB, patch)
2023-11-02 09:42 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2018-05-11 12:21:33 UTC
At the moment the emails in acuisistion (claims and orders) are sent with the email address of the librarian that triggers the sending. This is not practical in all cases for several reasons and it would be nicer if a general acquisition team email could be used.

The development should allow to configure the email on library level with a from, replyto and returnpath address similar to the branchemail and it's options.
Comment 1 Katrin Fischer 2023-06-06 07:54:29 UTC
We do now use the branch email instead of the librarian's, but it would still be nice to have an option for configuring a separate Acq Team email address to be used.
Comment 2 Michaela Sieber 2023-09-27 18:38:35 UTC
We propose the following new sysprefs:


1.) AcquisitionsDefaultEMailAddress	

Use the from email address _____ when sending acquisitions  order and claim notices. If left empty, it will fall back to the first defined address in the following list: Library email, KohaAdminEmailAddress.

2.) SerialsDefaultEMailAddress
	
 Use the from email address _____ when sending serial claim notices. If left empty, it will fall back to the first defined address in the following list: Library email, KohaAdminEmailAddress.



3.) AcquisitionsDefaultReplyTo
	
Use the reply-to email address _____ when sending acquisitions order and claim notices. If left empty, it will fall back to the first defined address in the following list: library ReplyTo, Library email, ReplytoDefault, KohaAdminEmailAddress.



4.) SerialsDefaultReplyTo

Use the reply-to email address _____ when sending serial claim notices. If left empty, it will fall back to the first defined address in the following list: library ReplyTo, Library email, ReplytoDefault, KohaAdminEmailAddress.
Comment 3 Michaela Sieber 2023-09-28 15:26:34 UTC
We will provide a path soon, hopefully ;-)
Comment 4 Raphael Straub 2023-10-16 13:38:18 UTC
Created attachment 157191 [details] [review]
Bug 20755: Add separate email configuration for acquisition and serial emails

This patch allows every library to define the From and Reply-to email addresses for acquisition and serial emails (orders and claims) sent by Koha.
Especially in large libraries with dedicated acquisition departments we need a way that vendors/booksellers can reply directly to the acquisition team and not to the library default email. The library email in the library configuration can then be used for circulation purposes only.

1) Apply patch, run database update
2) Make sure you have set up Koha to send up email (SMTP server, KohaAdminEmailAdress, etc.)
3) Make sure you have a vendor set up with a valid email address.
4) Check that you have four new system preferences:
  - AcquisitionsDefaultEMailAddress
  - SerialsDefaultEMailAddress
  - AcquisitionsDefaultReplyTo
  - SerialsDefaultReplyTo
5) Check that there is no change in behaviour if the four new system preferences are left empty:
All acquisition and serial emails are sent from the library email (or KohaAdminEmailAddress if no library email is set)
6) Create an order with at least one order line. Send the order to your vendor by email.
7) Create an acquisition claim notice and send it to your vendor.
8) Create a subscription linked to your vendor and with at least one late issue. Claim the issue.
9) There should be no change in behaviour: emails should be sent from library email (or KohaAdminEmailAddress if nothing is set on library level)
10) Configure different email addresses for system preferences:
  - First email address: AcquisitionsDefaultEMailAddress, SerialsDefaultEMailAddress
  - Second email address: AcquisitionsDefaultReplyTo, SerialsDefaultReplyTo
11) Repeat steps 6-8
12) Verify that the library specific acquisition and serial email addresses are used as From and Reply-to.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Comment 5 Michaela Sieber 2023-10-16 13:50:33 UTC
*** Bug 18853 has been marked as a duplicate of this bug. ***
Comment 6 Martin Renvoize 2023-10-18 08:25:29 UTC
Created attachment 157301 [details] [review]
Bug 20755: Add separate email configuration for acquisition and serial emails

This patch allows every library to define the From and Reply-to email addresses for acquisition and serial emails (orders and claims) sent by Koha.
Especially in large libraries with dedicated acquisition departments we need a way that vendors/booksellers can reply directly to the acquisition team and not to the library default email. The library email in the library configuration can then be used for circulation purposes only.

1) Apply patch, run database update
2) Make sure you have set up Koha to send up email (SMTP server, KohaAdminEmailAdress, etc.)
3) Make sure you have a vendor set up with a valid email address.
4) Check that you have four new system preferences:
  - AcquisitionsDefaultEMailAddress
  - SerialsDefaultEMailAddress
  - AcquisitionsDefaultReplyTo
  - SerialsDefaultReplyTo
5) Check that there is no change in behaviour if the four new system preferences are left empty:
All acquisition and serial emails are sent from the library email (or KohaAdminEmailAddress if no library email is set)
6) Create an order with at least one order line. Send the order to your vendor by email.
7) Create an acquisition claim notice and send it to your vendor.
8) Create a subscription linked to your vendor and with at least one late issue. Claim the issue.
9) There should be no change in behaviour: emails should be sent from library email (or KohaAdminEmailAddress if nothing is set on library level)
10) Configure different email addresses for system preferences:
  - First email address: AcquisitionsDefaultEMailAddress, SerialsDefaultEMailAddress
  - Second email address: AcquisitionsDefaultReplyTo, SerialsDefaultReplyTo
11) Repeat steps 6-8
12) Verify that the library specific acquisition and serial email addresses are used as From and Reply-to.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2023-10-18 08:27:26 UTC
All working great and no regressions found.

Signing off.

QA note.. we might want some regressions tests here just to ensure the feature isn't broken in a future refactor.

Welcome to the team Raphael :)
Comment 8 Katrin Fischer 2023-10-24 14:36:09 UTC
Working on this one and adding some unit tests.
Comment 9 Katrin Fischer 2023-10-24 15:41:47 UTC
Created attachment 157747 [details] [review]
Bug 20755: Add separate email configuration for acquisition and serial emails

This patch allows every library to define the From and Reply-to email addresses for acquisition and serial emails (orders and claims) sent by Koha.
Especially in large libraries with dedicated acquisition departments we need a way that vendors/booksellers can reply directly to the acquisition team and not to the library default email. The library email in the library configuration can then be used for circulation purposes only.

1) Apply patch, run database update
2) Make sure you have set up Koha to send up email (SMTP server, KohaAdminEmailAdress, etc.)
3) Make sure you have a vendor set up with a valid email address.
4) Check that you have four new system preferences:
  - AcquisitionsDefaultEMailAddress
  - SerialsDefaultEMailAddress
  - AcquisitionsDefaultReplyTo
  - SerialsDefaultReplyTo
5) Check that there is no change in behaviour if the four new system preferences are left empty:
All acquisition and serial emails are sent from the library email (or KohaAdminEmailAddress if no library email is set)
6) Create an order with at least one order line. Send the order to your vendor by email.
7) Create an acquisition claim notice and send it to your vendor.
8) Create a subscription linked to your vendor and with at least one late issue. Claim the issue.
9) There should be no change in behaviour: emails should be sent from library email (or KohaAdminEmailAddress if nothing is set on library level)
10) Configure different email addresses for system preferences:
  - First email address: AcquisitionsDefaultEMailAddress, SerialsDefaultEMailAddress
  - Second email address: AcquisitionsDefaultReplyTo, SerialsDefaultReplyTo
11) Repeat steps 6-8
12) Verify that the library specific acquisition and serial email addresses are used as From and Reply-to.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 10 Katrin Fischer 2023-10-24 15:41:50 UTC
Created attachment 157748 [details] [review]
Bug 20755: (QA follow-up) Add unit tests

prove t/db_dependent/Letters.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 11 Katrin Fischer 2023-10-24 15:41:52 UTC
Created attachment 157749 [details] [review]
Bug 20755: (QA follow-up) Fix capitalization in system preference description

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 12 Katrin Fischer 2023-10-25 09:40:39 UTC
Created attachment 157771 [details] [review]
Bug 20755: (QA follow-up) Add descriptions to system preferences

Updates both the atomic update file and the sysprefs.sql with
* explanations for each preference
* type = "Free"
Comment 13 Tomás Cohen Arazi 2023-10-31 13:07:11 UTC
Please rebase ASAP. Thanks!
Comment 14 Katrin Fischer 2023-11-02 09:42:36 UTC
Created attachment 158235 [details] [review]
Bug 20755: Add separate email configuration for acquisition and serial emails

This patch allows every library to define the From and Reply-to email addresses for acquisition and serial emails (orders and claims) sent by Koha.
Especially in large libraries with dedicated acquisition departments we need a way that vendors/booksellers can reply directly to the acquisition team and not to the library default email. The library email in the library configuration can then be used for circulation purposes only.

1) Apply patch, run database update
2) Make sure you have set up Koha to send up email (SMTP server, KohaAdminEmailAdress, etc.)
3) Make sure you have a vendor set up with a valid email address.
4) Check that you have four new system preferences:
  - AcquisitionsDefaultEMailAddress
  - SerialsDefaultEMailAddress
  - AcquisitionsDefaultReplyTo
  - SerialsDefaultReplyTo
5) Check that there is no change in behaviour if the four new system preferences are left empty:
All acquisition and serial emails are sent from the library email (or KohaAdminEmailAddress if no library email is set)
6) Create an order with at least one order line. Send the order to your vendor by email.
7) Create an acquisition claim notice and send it to your vendor.
8) Create a subscription linked to your vendor and with at least one late issue. Claim the issue.
9) There should be no change in behaviour: emails should be sent from library email (or KohaAdminEmailAddress if nothing is set on library level)
10) Configure different email addresses for system preferences:
  - First email address: AcquisitionsDefaultEMailAddress, SerialsDefaultEMailAddress
  - Second email address: AcquisitionsDefaultReplyTo, SerialsDefaultReplyTo
11) Repeat steps 6-8
12) Verify that the library specific acquisition and serial email addresses are used as From and Reply-to.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 15 Katrin Fischer 2023-11-02 09:42:39 UTC
Created attachment 158236 [details] [review]
Bug 20755: (QA follow-up) Add unit tests

prove t/db_dependent/Letters.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 16 Katrin Fischer 2023-11-02 09:42:41 UTC
Created attachment 158237 [details] [review]
Bug 20755: (QA follow-up) Fix capitalization in system preference description

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 17 Katrin Fischer 2023-11-02 09:42:44 UTC
Created attachment 158238 [details] [review]
Bug 20755: (QA follow-up) Add descriptions to system preferences

Updates both the atomic update file and the sysprefs.sql with
* explanations for each preference
* type = "Free"
Comment 18 Katrin Fischer 2023-11-02 09:45:04 UTC
Easy rebase: There was a new system preference 'SerialsSearchResultsLimit' right before the ones added here. The only conflict was in sysprefs.sql.
Comment 19 Tomás Cohen Arazi 2023-11-08 14:42:21 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 20 Fridolin Somers 2023-11-10 21:27:30 UTC
Enhancement not pushed to 23.05.x
Comment 21 Caroline Cyr La Rose 2023-11-27 22:16:51 UTC
Is it normal that the Serials system preferences are under Acquisitions preferences?