Bug 29393 - Ability to send emails from patron details page
Summary: Ability to send emails from patron details page
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low new feature with 10 votes (vote)
Assignee: Alex Arnaud
QA Contact: Testopia
URL:
Keywords:
Depends on: 12802
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-02 15:04 UTC by Alex Arnaud
Modified: 2024-01-09 09:28 UTC (History)
9 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 29393 - Ability to send emails from patron details page (11.49 KB, patch)
2021-11-03 10:19 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393 - Ability to send emails from patron details page (11.55 KB, patch)
2021-11-03 10:22 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393 - Use patron language in letters (1.03 KB, patch)
2021-11-08 14:16 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393 - add a dedicated letters module for add message (3.87 KB, patch)
2021-11-10 10:34 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393 - Add send_messages_to_borrowers permission (4.78 KB, patch)
2021-11-10 13:45 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393 - Don't show notice templates for each language (865 bytes, patch)
2021-11-19 09:00 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393 - Ability to send emails from patron details page (11.59 KB, patch)
2021-12-03 14:00 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393 - Use patron language in letters (1.07 KB, patch)
2021-12-03 14:00 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393 - add a dedicated letters module for add message (3.91 KB, patch)
2021-12-03 14:01 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393 - Add send_messages_to_borrowers permission (4.82 KB, patch)
2021-12-03 14:01 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393 - Don't show notice templates for each language (904 bytes, patch)
2021-12-03 14:01 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393 - Sort notice templates by name (792 bytes, patch)
2021-12-08 13:04 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 29393: (follow-up) Explicite use of methods from C4 (757 bytes, patch)
2023-03-14 20:42 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 29393: Ability to send emails from patron details page (11.51 KB, patch)
2023-03-14 20:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 29393: Use patron language in letters (1.04 KB, patch)
2023-03-14 20:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 29393: Add a dedicated letters module for add message (3.96 KB, patch)
2023-03-14 20:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 29393: Add send_messages_to_borrowers permission (4.78 KB, patch)
2023-03-14 20:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 29393: Don't show notice templates for each language (871 bytes, patch)
2023-03-14 20:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 29393: Sort notice templates by name (759 bytes, patch)
2023-03-14 20:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 29393: (follow-up) Explicite use of methods from C4 (757 bytes, patch)
2023-03-14 20:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 29393: Prevent SQL errors when SQL strict mode is set (903 bytes, patch)
2023-04-18 14:31 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 29393: Ability to send emails from patron details page (11.80 KB, patch)
2023-12-20 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29393: Use patron language in letters (1.22 KB, patch)
2023-12-20 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29393: Add a dedicated letters module for add message (4.10 KB, patch)
2023-12-20 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29393: Add send_messages_to_borrowers permission (4.78 KB, patch)
2023-12-20 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29393: Don't show notice templates for each language (873 bytes, patch)
2023-12-20 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29393: Sort notice templates by name (761 bytes, patch)
2023-12-20 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29393: (follow-up) Explicite use of methods from C4 (759 bytes, patch)
2023-12-20 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29393: Prevent SQL errors when SQL strict mode is set (905 bytes, patch)
2023-12-20 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29393: Prevent SQL errors when SQL strict mode is set (957 bytes, patch)
2024-01-08 15:07 UTC, Matthias Le Gac
Details | Diff | Splinter Review
Bug 29393: Prevent SQL errors when SQL strict mode is set (957 bytes, patch)
2024-01-08 15:11 UTC, Matthias Le Gac
Details | Diff | Splinter Review
Bug 29393: Prevent SQL errors when SQL strict mode is set (960 bytes, patch)
2024-01-08 15:11 UTC, Phan Tung Bui
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Arnaud 2021-11-02 15:04:18 UTC

    
Comment 1 Alex Arnaud 2021-11-03 10:19:50 UTC Comment hidden (obsolete)
Comment 2 Alex Arnaud 2021-11-03 10:22:36 UTC
Created attachment 127238 [details] [review]
Bug 29393 - Ability to send emails from patron details page

Test plan
  - apply Bug 12802
  - go to a patron's details page
  - click on "Add message" in tools bar
  - choose "Email" in "Add a message for"
  - Select a notice (module members) or manualy fill the message
  - Save
  - Check the message is saved in message_queue table
Comment 3 Alex Arnaud 2021-11-03 10:27:46 UTC
This adds the ability to send email via patron messages (/cgi-bin/koha/circ/add_message.pl).
This feature depends on bug 12802.

Recipients are defined by AutoEmailPrimaryAddress.
Comment 4 Owen Leonard 2021-11-03 11:33:24 UTC
I worry that too many of the available notices depend on logic or circumstances which aren't taken into account for here.

- ACCTDETAILS Account Details Template - DEFAULT -- This one is useful, although it's not good that our sample notice includes the encrypted password.

- MEMBERSHIP_EXPIRY Account expiration -- I can see this being useful as well.

- OPAC_REG_VERIFY Opac Self-Registration Verification Email -- This would be useful if it could be done, but can it? If you require email verification for self-registrations the patron record isn't created until verified. Meaning you couldn't find the patron record to re-send the verification.

- PASSWORD_RESET Online password reset -- Useful, but doesn't work. There is no link in the message.

- DISCHARGE Discharge -- This notice is usually generated as a PDF, not sent via email. Does an email work for the discharge process?

These notices don't make sense because there's not enough context for the message:

PROBLEM_REPORT OPAC Problem Report
SHARE_ACCEPT Notification about an accepted share
SHARE_INVITE Invitation for sharing a list
Comment 5 Donna 2021-11-03 12:45:24 UTC
I feel this would benefit from having a permission attached to it.  Many libraries will not want all staff to have this ability and will want an easy way to disable it, without blocking staff from being able to use the Add message functionality.
Comment 6 Alex Arnaud 2021-11-03 12:46:40 UTC
(In reply to Owen Leonard from comment #4)
> I worry that too many of the available notices depend on logic or
> circumstances which aren't taken into account for here.
> 

Hello Owen,

I would say that it is the responsibility of the user/librarian to use the 
appropriate letter. Is there any security/system/GDPR risk according to you ?

The goal here is to allow librarian to have some predefined letters to be used in the "Add message" feature. I choose "members" as letters category for this.
Would a new module be better ?

And thank you for testing.
Comment 7 Alex Arnaud 2021-11-08 14:16:44 UTC
Created attachment 127452 [details] [review]
Bug 29393 - Use patron language in letters
Comment 8 Alex Arnaud 2021-11-10 10:34:50 UTC
Created attachment 127506 [details] [review]
Bug 29393 - add a dedicated letters module for add message
Comment 9 Alex Arnaud 2021-11-10 13:45:49 UTC
Created attachment 127511 [details] [review]
Bug 29393 - Add send_messages_to_borrowers permission
Comment 10 Alex Arnaud 2021-11-19 09:00:29 UTC
Created attachment 127847 [details] [review]
Bug 29393 - Don't show notice templates for each language
Comment 11 Alex Arnaud 2021-12-03 14:00:44 UTC
Created attachment 128215 [details] [review]
Bug 29393 - Ability to send emails from patron details page

Test plan
  - apply Bug 12802
  - go to a patron's details page
  - click on "Add message" in tools bar
  - choose "Email" in "Add a message for"
  - Select a notice (module members) or manualy fill the message
  - Save
  - Check the message is saved in message_queue table

Sponsored-by: Aix-Marseille University
Comment 12 Alex Arnaud 2021-12-03 14:00:59 UTC
Created attachment 128216 [details] [review]
Bug 29393 - Use patron language in letters

Sponsored-by: Aix-Marseille University
Comment 13 Alex Arnaud 2021-12-03 14:01:09 UTC
Created attachment 128217 [details] [review]
Bug 29393 - add a dedicated letters module for add message

Sponsored-by: Aix-Marseille University
Comment 14 Alex Arnaud 2021-12-03 14:01:20 UTC
Created attachment 128218 [details] [review]
Bug 29393 - Add send_messages_to_borrowers permission

Sponsored-by: Aix-Marseille University
Comment 15 Alex Arnaud 2021-12-03 14:01:30 UTC
Created attachment 128219 [details] [review]
Bug 29393 - Don't show notice templates for each language

Sponsored-by: Aix-Marseille University
Comment 16 Alex Arnaud 2021-12-08 13:04:07 UTC
Created attachment 128363 [details] [review]
Bug 29393 - Sort notice templates by name

Sponsored-by: Aix-Marseille University
Comment 17 Rachael 2022-07-04 13:38:09 UTC
patch doesn't apply
Comment 18 Fridolin Somers 2023-03-14 20:42:15 UTC
Created attachment 148187 [details] [review]
Bug 29393: (follow-up) Explicite use of methods from C4
Comment 19 Fridolin Somers 2023-03-14 20:43:25 UTC
Created attachment 148188 [details] [review]
Bug 29393: Ability to send emails from patron details page

Test plan
  - apply Bug 12802
  - go to a patron's details page
  - click on "Add message" in tools bar
  - choose "Email" in "Add a message for"
  - Select a notice (module members) or manualy fill the message
  - Save
  - Check the message is saved in message_queue table
Comment 20 Fridolin Somers 2023-03-14 20:43:28 UTC
Created attachment 148189 [details] [review]
Bug 29393: Use patron language in letters
Comment 21 Fridolin Somers 2023-03-14 20:43:31 UTC
Created attachment 148190 [details] [review]
Bug 29393: Add a dedicated letters module for add message
Comment 22 Fridolin Somers 2023-03-14 20:43:34 UTC
Created attachment 148191 [details] [review]
Bug 29393: Add send_messages_to_borrowers permission
Comment 23 Fridolin Somers 2023-03-14 20:43:37 UTC
Created attachment 148192 [details] [review]
Bug 29393: Don't show notice templates for each language
Comment 24 Fridolin Somers 2023-03-14 20:43:40 UTC
Created attachment 148193 [details] [review]
Bug 29393: Sort notice templates by name
Comment 25 Fridolin Somers 2023-03-14 20:43:43 UTC
Created attachment 148194 [details] [review]
Bug 29393: (follow-up) Explicite use of methods from C4
Comment 26 Fridolin Somers 2023-03-14 20:45:22 UTC
rebased on current master
+ a small follow-up
Comment 27 Julian Maurice 2023-04-18 14:31:13 UTC
Created attachment 149812 [details] [review]
Bug 29393: Prevent SQL errors when SQL strict mode is set
Comment 28 Lucas Gass 2023-05-25 16:54:30 UTC
Merge conflicts in circ/add_message.pl.
Comment 29 Martin Renvoize 2023-12-20 12:37:33 UTC
Created attachment 160107 [details] [review]
Bug 29393: Ability to send emails from patron details page

Test plan
  - apply Bug 12802
  - go to a patron's details page
  - click on "Add message" in tools bar
  - choose "Email" in "Add a message for"
  - Select a notice (module members) or manualy fill the message
  - Save
  - Check the message is saved in message_queue table
Comment 30 Martin Renvoize 2023-12-20 12:37:37 UTC
Created attachment 160108 [details] [review]
Bug 29393: Use patron language in letters
Comment 31 Martin Renvoize 2023-12-20 12:37:40 UTC
Created attachment 160109 [details] [review]
Bug 29393: Add a dedicated letters module for add message
Comment 32 Martin Renvoize 2023-12-20 12:37:43 UTC
Created attachment 160110 [details] [review]
Bug 29393: Add send_messages_to_borrowers permission
Comment 33 Martin Renvoize 2023-12-20 12:37:47 UTC
Created attachment 160111 [details] [review]
Bug 29393: Don't show notice templates for each language
Comment 34 Martin Renvoize 2023-12-20 12:37:50 UTC
Created attachment 160112 [details] [review]
Bug 29393: Sort notice templates by name
Comment 35 Martin Renvoize 2023-12-20 12:37:53 UTC
Created attachment 160113 [details] [review]
Bug 29393: (follow-up) Explicite use of methods from C4
Comment 36 Martin Renvoize 2023-12-20 12:37:56 UTC
Created attachment 160114 [details] [review]
Bug 29393: Prevent SQL errors when SQL strict mode is set
Comment 37 Martin Renvoize 2023-12-20 12:39:42 UTC
Just a rebase for now..

Reviewing the code a bit next.
Comment 38 Martin Renvoize 2023-12-20 12:56:50 UTC
I'm interested in the idea's here.. but I'd love to see a specification or set or original requirements attached.

I fear we're ending up with a series of overlapping features.. we need someone to take a step back and look at the big picture.

We now have 'OPAC Problem reports', 'Catalog concerns (misnamed due to original requirements.. should really be 'request tracking'), Notices, 'OPAC Note' and checkout notes.
Comment 39 Martin Renvoize 2023-12-20 12:57:55 UTC
I feel like we could improve the notice template functionality, displaying a preview (maybe even editable) of the notice prior to sending.
Comment 40 Anneli Österman 2024-01-02 11:06:10 UTC
Some notes:

- If you add a new notice to Patrons (MEMBERS) category, they do not show up in Add message email drop down. Test plan does not apply in this case.
- If you add a new notice to "Add message" category, they show up in Add message email drop down. There is no mention of this category in the test plan.
- When you choose a notice to send, you cannot see it's content. You can see it only after it is saved to message queue.
Comment 41 Matthias Le Gac 2024-01-08 15:07:54 UTC
Created attachment 160633 [details] [review]
Bug 29393: Prevent SQL errors when SQL strict mode is set

Signed-off-by: matthias <matthias.le-gac@inlibro.net>
Comment 42 Matthias Le Gac 2024-01-08 15:11:11 UTC
Created attachment 160638 [details] [review]
Bug 29393: Prevent SQL errors when SQL strict mode is set

Signed-off-by: matthias <matthias.le-gac@inlibro.net>
Comment 43 Phan Tung Bui 2024-01-08 15:11:31 UTC
Created attachment 160639 [details] [review]
Bug 29393: Prevent SQL errors when SQL strict mode is set

Signed-off-by: Phan Tung Bui <phan-tung.bui@inlibro.com>