Bug 19496 - Patron notes about item does not get emailed as indicated
Summary: Patron notes about item does not get emailed as indicated
Status: CLOSED FIXED
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:
Keywords:
Depends on: 14224
Blocks: 22821
  Show dependency treegraph
 
Reported: 2017-10-19 20:28 UTC by Kelly McElligott
Modified: 2020-01-06 20:17 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 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
Bug 19496: [17.05.x] Fixing to_address for patron notes (4.77 KB, patch)
2017-12-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 19496: [17.05.x] ReplytoDefault is a pref, not a C4::Context method (1.05 KB, patch)
2017-12-21 13:11 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!
Comment 8 Nick Clemens 2017-12-14 18:19:24 UTC
Pushed to stable for 17.11.01, awesome work all!
Comment 9 Fridolin Somers 2017-12-21 09:50:46 UTC
Patch does not apply to 17.05.x because it is still $member hash instead of $patron object.
Rebase looks tricky, please provide rebased patches.
Comment 10 Jonathan Druart 2017-12-21 13:11:48 UTC
Created attachment 70012 [details] [review]
Bug 19496: [17.05.x] 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 11 Jonathan Druart 2017-12-21 13:11:56 UTC
Created attachment 70013 [details] [review]
Bug 19496: [17.05.x] ReplytoDefault is a pref, not a C4::Context method
Comment 12 Jonathan Druart 2017-12-21 13:12:43 UTC
(In reply to Fridolin SOMERS from comment #9)
> Patch does not apply to 17.05.x because it is still $member hash instead of
> $patron object.
> Rebase looks tricky, please provide rebased patches.

Done, please test!
Comment 13 Fridolin Somers 2018-01-09 12:26:38 UTC
(In reply to Jonathan Druart from comment #12)
> (In reply to Fridolin SOMERS from comment #9)
> > Patch does not apply to 17.05.x because it is still $member hash instead of
> > $patron object.
> > Rebase looks tricky, please provide rebased patches.
> 
> Done, please test!

Works perfect thanks a lot
Comment 14 Fridolin Somers 2018-01-09 12:27:05 UTC
Pushed to 17.05.x for 17.05.08
Comment 15 Martin Renvoize 2019-05-01 15:32:29 UTC
This looks incorrect to me with regards to how email preference fallbacks should work.

I'm going to open another bug to clarify - bug 22821