Bug 29005 - Add option to send WELCOME notice for new patrons added via patron imports
Summary: Add option to send WELCOME notice for new patrons added via patron imports
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
: 18940 (view as bug list)
Depends on: 17648
Blocks: 30237
  Show dependency treegraph
 
Reported: 2021-09-13 14:03 UTC by Martin Renvoize
Modified: 2023-08-21 17:32 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds a new option to patron imports allowing imports to trigger sending the 'WELCOME' notice for new user accounts created via this mechanism.
Version(s) released in:
22.05.00


Attachments
Bug 29005: Enable welcome email from patron imports (2.47 KB, patch)
2021-10-01 09:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Enable welcome email from patron imports (2.75 KB, patch)
2021-10-11 12:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Enable welcome email from patron imports (2.86 KB, patch)
2021-10-11 12:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Add option to send welcome email from patron imports (6.28 KB, patch)
2022-03-02 13:35 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Add option to send welcome email from patron imports (6.29 KB, patch)
2022-03-02 13:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Add support for the command line script (1.76 KB, patch)
2022-03-02 13:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Add option to send welcome email from patron imports (6.67 KB, patch)
2022-03-02 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Add support for the command line script (1.76 KB, patch)
2022-03-02 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Unit tests (2.48 KB, patch)
2022-03-02 14:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Add option to send welcome email from patron imports (6.67 KB, patch)
2022-03-02 14:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Add support for the command line script (1.76 KB, patch)
2022-03-02 14:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Unit tests (2.48 KB, patch)
2022-03-02 14:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29005: Add option to send welcome email from patron imports (6.73 KB, patch)
2022-03-31 14:43 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 29005: Add support for the command line script (1.82 KB, patch)
2022-03-31 14:44 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 29005: Unit tests (2.53 KB, patch)
2022-03-31 14:44 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 29005: Add support for the command line script (1.88 KB, patch)
2022-04-03 10:02 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 29005: Unit tests (2.59 KB, patch)
2022-04-03 10:02 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 Martin Renvoize 2021-09-13 14:03:19 UTC
It would be helpful to add automatic email to users on patron imports.
Comment 1 Martin Renvoize 2021-10-01 09:42:38 UTC
Created attachment 125598 [details] [review]
Bug 29005: Enable welcome email from patron imports

This patch was updated from work done by Evangelische Theologische
Faculteit to allow the patron import to send welcome emails to users
when enabled.
Comment 2 Martin Renvoize 2021-10-11 12:24:16 UTC
Created attachment 126039 [details] [review]
Bug 29005: Enable welcome email from patron imports

This patch was updated from work done by Evangelische Theologische
Faculteit to allow the patron import to send welcome emails to users
when enabled.

Test plan
1. Enable 'AutoEmailOpacUser' system preference
2. Add a new user via the csv patron imports (Include a password and an
   email address for which you have access)
3. Check that you received a welcome email for the user.
4. Overwrite the previous user with a new password using CSV imports
5. Check that you received a welcome email again for the user.
Comment 3 Martin Renvoize 2021-10-11 12:27:52 UTC
Created attachment 126040 [details] [review]
Bug 29005: Enable welcome email from patron imports

This patch was updated from work done by Evangelische Theologische
Faculteit to allow the patron import to send welcome emails to users
when enabled.

Test plan
1. Enable 'AutoEmailOpacUser' system preference
2. Add a new user via the csv patron imports (Include a password and an
   email address for which you have access)
3. Check that you received a welcome email for the user.
4. Overwrite the previous user with a new password using CSV imports
5. Check that you received a welcome email again for the user.

Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2021-10-11 12:29:35 UTC
Credit where credit's due.. I've amended the patch author to reflect that ETF originally authored the patch and I just rescued it with a rebase for modern Koha versions.

Welcome to the submissions ETF :)
Comment 5 Donna 2022-03-01 20:23:42 UTC
I'd like to see this as an option in the system preference as to which new patrons get the email - batch created, individually created, both, or neither.  There are libraries that will do batch imports that do not want to send an email to the new users from the batch import, but do still want to send emails to users that are created individually.  

For instance, a public library will want to send emails to users they register in person, but when they do a batch upload of students to permit them access to digital resources, they don't want to send welcome emails to the students.
Comment 6 Martin Renvoize 2022-03-02 12:01:29 UTC
I'm going to rework with bug in the light of bug 17648 now.
Comment 7 Martin Renvoize 2022-03-02 13:35:09 UTC
Created attachment 131246 [details] [review]
Bug 29005: Add option to send welcome email from patron imports

This patch adds the ability to send the ACCTDETAILS notice for new users
added using the patron import tool.

Test plan
1. Create a valid csv for patron import that includes some new users,
   ensuring you add a valid email address for which you have access.
2. Import the users using the patron import tool and select the new
   'Send email to new patrons' checkbox.
3. Check that the notice appears in the new patrons notices
4. Check that you received a welcome email for the user.
Comment 8 Martin Renvoize 2022-03-02 13:36:16 UTC
Created attachment 131247 [details] [review]
Bug 29005: Add option to send welcome email from patron imports

This patch adds the ability to send the ACCTDETAILS notice for new users
added using the patron import tool.

Test plan
1. Create a valid csv for patron import that includes some new users,
   ensuring you add a valid email address for which you have access.
2. Import the users using the patron import tool and select the new
   'Send email to new patrons' checkbox.
3. Check that the notice appears in the new patrons notices
4. Check that you received a welcome email for the user.
Comment 9 Martin Renvoize 2022-03-02 13:42:10 UTC
Created attachment 131248 [details] [review]
Bug 29005: Add support for the command line script

This patch adds welcome email for new users support to the command line
patron import tool.
Comment 10 Martin Renvoize 2022-03-02 14:20:30 UTC
Created attachment 131249 [details] [review]
Bug 29005: Add option to send welcome email from patron imports

This patch adds the ability to send the ACCTDETAILS notice for new users
added using the patron import tool.

Test plan
1. Create a valid csv for patron import that includes some new users,
   ensuring you add a valid email address for which you have access.
2. Import the users using the patron import tool and select the new
   'Send email to new patrons' checkbox.
3. Check that the notice appears in the new patrons notices
4. Check that you received a welcome email for the user.
Comment 11 Martin Renvoize 2022-03-02 14:20:34 UTC
Created attachment 131250 [details] [review]
Bug 29005: Add support for the command line script

This patch adds welcome email for new users support to the command line
patron import tool.
Comment 12 Martin Renvoize 2022-03-02 14:20:38 UTC
Created attachment 131251 [details] [review]
Bug 29005: Unit tests

Add a unit test for the additional functionality of sending welcome
emails from Koha::Patrons::Import.
Comment 13 Martin Renvoize 2022-03-02 14:24:10 UTC
Created attachment 131252 [details] [review]
Bug 29005: Add option to send welcome email from patron imports

This patch adds the ability to send the ACCTDETAILS notice for new users
added using the patron import tool.

Test plan
1. Create a valid csv for patron import that includes some new users,
   ensuring you add a valid email address for which you have access.
2. Import the users using the patron import tool and select the new
   'Send email to new patrons' checkbox.
3. Check that the notice appears in the new patrons notices
4. Check that you received a welcome email for the user.
Comment 14 Martin Renvoize 2022-03-02 14:24:14 UTC
Created attachment 131253 [details] [review]
Bug 29005: Add support for the command line script

This patch adds welcome email for new users support to the command line
patron import tool.
Comment 15 Martin Renvoize 2022-03-02 14:24:18 UTC
Created attachment 131254 [details] [review]
Bug 29005: Unit tests

Add a unit test for the additional functionality of sending welcome
emails from Koha::Patrons::Import.
Comment 16 Kyle M Hall 2022-03-31 14:43:51 UTC
Created attachment 132782 [details] [review]
Bug 29005: Add option to send welcome email from patron imports

This patch adds the ability to send the ACCTDETAILS notice for new users
added using the patron import tool.

Test plan
1. Create a valid csv for patron import that includes some new users,
   ensuring you add a valid email address for which you have access.
2. Import the users using the patron import tool and select the new
   'Send email to new patrons' checkbox.
3. Check that the notice appears in the new patrons notices
4. Check that you received a welcome email for the user.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 17 Kyle M Hall 2022-03-31 14:44:04 UTC
Created attachment 132783 [details] [review]
Bug 29005: Add support for the command line script

This patch adds welcome email for new users support to the command line
patron import tool.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 18 Kyle M Hall 2022-03-31 14:44:09 UTC
Created attachment 132784 [details] [review]
Bug 29005: Unit tests

Add a unit test for the additional functionality of sending welcome
emails from Koha::Patrons::Import.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 19 Katrin Fischer 2022-04-03 10:02:44 UTC
Created attachment 132909 [details] [review]
Bug 29005: Add support for the command line script

This patch adds welcome email for new users support to the command line
patron import tool.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 20 Katrin Fischer 2022-04-03 10:02:49 UTC
Created attachment 132910 [details] [review]
Bug 29005: Unit tests

Add a unit test for the additional functionality of sending welcome
emails from Koha::Patrons::Import.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 21 Fridolin Somers 2022-04-20 19:04:42 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 22 Owen Leonard 2023-08-21 17:32:50 UTC
*** Bug 18940 has been marked as a duplicate of this bug. ***