Bug 19496 - Patron notes about item does not get emailed as indicated
Summary: Patron notes about item does not get emailed as indicated
Status: Pushed to Master
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Aleisha Amohia
QA Contact: Josef Moravec
URL:
Whiteboard:
Keywords:
Depends on: 14224
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-19 20:28 UTC by Kelly McElligott
Modified: 2017-12-07 14:25 UTC (History)
5 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19496: Fixing to_address for patron notes (3.12 KB, patch)
2017-11-27 22:10 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19496: Fixing to_address for patron notes (3.18 KB, patch)
2017-12-01 20:13 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 19496: Fixing to_address for patron notes (3.23 KB, patch)
2017-12-07 13:13 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19496: ReplytoDefault is a pref, not a C4::Context method (1.04 KB, patch)
2017-12-07 13:53 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2017-10-19 20:28:54 UTC
According to Bug 14224, with the system preference 'allowcheckoutnotes' enabled, the process should go like this: 

1.The patron leaves a note on an item in the OPAC
2.A notice is generated and will be emailed to branch email.
3. Upon checkin of the item the note is displayed on the staff client.

However, currently with this system preference enabled,
1. The patron leaves a note on the item in the OPAC
2. The patron's email receives the notice. 
3. Upon check in of the item, the note is displayed on the staff client.


  
There are two other bugs are shown as block to the original bug 14224 - these bugs are 17698 and 18915.
Comment 1 Jonathan Druart 2017-11-02 11:30:34 UTC
Aleisha, can you take care of this one please?
Comment 2 Aleisha Amohia 2017-11-27 22:10:41 UTC
Created attachment 69404 [details] [review]
Bug 19496: Fixing to_address for patron notes

This patch ensures the patron note to_address is the branch email or the
Koha Admin email, and the from_address is the patron's email.

To test:
1) Ensure syspref 'allowcheckoutnotes' is turned on
2) Go to OPAC, leave a note on a checkout
3) Confirm that the note is received (in mysql message_queue) but the
to_address is the patron's email - this is wrong
4) Apply patch and refresh OPAC
5) Leave a note on a checkout
6) Confirm that the note is received in message queue
7) Confirm that the to_address is one of:
- branch email
- branch reply to
- syspref ReplytoDefault
- syspref KohaAdminEmailAddress
8) Confirm that the from_address is one of:
- patron email
- patron emailpro
- patron B_email

Sponsored-by: Catalyst IT
Comment 3 David Bourgault 2017-12-01 20:13:18 UTC
Created attachment 69455 [details] [review]
Bug 19496: Fixing to_address for patron notes

This patch ensures the patron note to_address is the branch email or the
Koha Admin email, and the from_address is the patron's email.

To test:
1) Ensure syspref 'allowcheckoutnotes' is turned on
2) Go to OPAC, leave a note on a checkout
3) Confirm that the note is received (in mysql message_queue) but the
to_address is the patron's email - this is wrong
4) Apply patch and refresh OPAC
5) Leave a note on a checkout
6) Confirm that the note is received in message queue
7) Confirm that the to_address is one of:
- branch email
- branch reply to
- syspref ReplytoDefault
- syspref KohaAdminEmailAddress
8) Confirm that the from_address is one of:
- patron email
- patron emailpro
- patron B_email

Sponsored-by: Catalyst IT

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Comment 4 Josef Moravec 2017-12-07 13:13:19 UTC
Created attachment 69606 [details] [review]
Bug 19496: Fixing to_address for patron notes

This patch ensures the patron note to_address is the branch email or the
Koha Admin email, and the from_address is the patron's email.

To test:
1) Ensure syspref 'allowcheckoutnotes' is turned on
2) Go to OPAC, leave a note on a checkout
3) Confirm that the note is received (in mysql message_queue) but the
to_address is the patron's email - this is wrong
4) Apply patch and refresh OPAC
5) Leave a note on a checkout
6) Confirm that the note is received in message queue
7) Confirm that the to_address is one of:
- branch email
- branch reply to
- syspref ReplytoDefault
- syspref KohaAdminEmailAddress
8) Confirm that the from_address is one of:
- patron email
- patron emailpro
- patron B_email

Sponsored-by: Catalyst IT

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Jonathan Druart 2017-12-07 13:53:37 UTC
Created attachment 69611 [details] [review]
Bug 19496: ReplytoDefault is a pref, not a C4::Context method
Comment 6 Jonathan Druart 2017-12-07 13:55:40 UTC
I expect that librarians will get spammed. But as soon as it fixed a major bug I am going to push this patch.
We should generate a digest for these PATRON_NOTE notice.

See also bug 19772 I found when testing this patch.
Comment 7 Jonathan Druart 2017-12-07 14:25:37 UTC
Pushed to master for 18.05, thanks to everybody involved!