Bug 17648

Summary: ACCTDETAILS notice doesn't show in the notices tab in staff
Product: Koha Reporter: Barton Chittenden <barton>
Component: NoticesAssignee: Kyle M Hall (khall) <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: kyle, martin.renvoize, sophie.meynieux
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.05
Circulation function:
Bug Depends on: 27812    
Bug Blocks: 29005, 30214    
Attachments: Bug 17648: ACCTDETAILS notice does not show in notices.pl
Bug 17648: ACCTDETAILS notice does not show in notices.pl
Bug 17648: (QA follow-up) Further code cleaning
Bug 17648: (QA follow-up) Restore imediate sending of the notice
Bug 17648: (QA follow-up) Restore imediate sending of the notice
Bug 17648: ACCTDETAILS notice does not show in notices.pl
Bug 17648: (QA follow-up) Further code cleaning
Bug 17648: (QA follow-up) Restore imediate sending of the notice

Description Barton Chittenden 2016-11-17 01:50:55 UTC
The ACCTDETAILS notice apparently bypasses message_queue; notices are sent directly to the linux mail queue.

This may be useful from the standpoint that the message is sent immediately, but it should still be added to message_queue with status='sent', so that it's available when looking at the borrowers notices.

--Barton
Comment 1 Katrin Fischer 2016-11-17 06:57:54 UTC
This is intentional as it is designed to send out clear text passwords (which might be debatable anyway).
Comment 2 Katrin Fischer 2016-11-17 06:59:07 UTC
So yeah, we can't just add it without more thought, but it would be nice to make it possible to see that one has been sent.
Comment 3 Sophie MEYNIEUX 2020-04-15 09:08:13 UTC
All alerts (that are sent directly and not queued in message_queue) are not displaid in notices. Should we have another way to store them or just had them to message_queue ?
Comment 4 Katrin Fischer 2020-04-15 10:07:49 UTC
I think I'd prefer "one place" for them. But we might need some adjustments. For example the list invites can be sent to arbitrary email addresses - so there is no account you'd see them from. maybe a view of the message queue somewhere - we use a report for that right now "messages sent out today" in our installations.
Comment 5 Katrin Fischer 2021-03-13 11:59:18 UTC
If we realize 27812 we could add it to the messagequeue after.
Comment 6 Kyle M Hall (khall) 2022-02-28 14:05:44 UTC
Created attachment 131165 [details] [review]
Bug 17648: ACCTDETAILS notice does not show in notices.pl

The ACCTDETAILS notice apparently bypasses message_queue; notices are sent directly to the linux mail queue.

Test Plan:
1) Apply this patch
2) Create a new patron with an email address
3) Note the patron's ACCTDETAILS notice shows in the patron's messages
Comment 7 Katrin Fischer 2022-02-28 14:33:03 UTC
I don't we should do this before we have resolved bug 27812 that I have tried to give another push.
Comment 8 Kyle M Hall (khall) 2022-02-28 15:09:00 UTC
(In reply to Katrin Fischer from comment #7)
> I don't we should do this before we have resolved bug 27812 that I have
> tried to give another push.

Agreed! I build this on top of 27812 so when I submitted my updated patches, this one got updated a couple minutes before that one :)
Comment 9 Martin Renvoize (ashimema) 2022-03-01 16:30:11 UTC
Created attachment 131199 [details] [review]
Bug 17648: ACCTDETAILS notice does not show in notices.pl

The ACCTDETAILS notice apparently bypasses message_queue; notices are sent directly to the linux mail queue.

Test Plan:
1) Apply this patch
2) Create a new patron with an email address
3) Note the patron's ACCTDETAILS notice shows in the patron's messages

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize (ashimema) 2022-03-01 16:30:15 UTC
Created attachment 131200 [details] [review]
Bug 17648: (QA follow-up) Further code cleaning

We actually have a Koha::Patron method to do all the work of finding the
right patron primary email address for notices.. we can use that here
instead of doing it long hand.
Comment 11 Martin Renvoize (ashimema) 2022-03-01 16:30:41 UTC
Great improvement, all works ass expected.. Signing off
Comment 12 Martin Renvoize (ashimema) 2022-03-01 16:49:40 UTC
Created attachment 131202 [details] [review]
Bug 17648: (QA follow-up) Restore imediate sending of the notice

The original notice was sent using SendAlerts, which triggers
immediately on submission and doesn't wait for the cron task.

This patch restores that immediacy and also fixes a bug in the imports
on the original patch.
Comment 13 Martin Renvoize (ashimema) 2022-03-02 13:33:16 UTC
Created attachment 131245 [details] [review]
Bug 17648: (QA follow-up) Restore imediate sending of the notice

The original notice was sent using SendAlerts, which triggers
immediately on submission and doesn't wait for the cron task.

This patch restores that immediacy and also fixes a bug in the imports
on the original patch.
Comment 14 Martin Renvoize (ashimema) 2022-03-02 13:34:42 UTC
OK, this all works now.. but only with my followups as they fix the imports.. I decided not to doctor Kyles original patch ;)
Comment 15 Katrin Fischer 2022-03-06 12:08:00 UTC
Created attachment 131403 [details] [review]
Bug 17648: ACCTDETAILS notice does not show in notices.pl

The ACCTDETAILS notice apparently bypasses message_queue; notices are sent directly to the linux mail queue.

Test Plan:
1) Apply this patch
2) Create a new patron with an email address
3) Note the patron's ACCTDETAILS notice shows in the patron's messages

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2022-03-06 12:08:05 UTC
Created attachment 131404 [details] [review]
Bug 17648: (QA follow-up) Further code cleaning

We actually have a Koha::Patron method to do all the work of finding the
right patron primary email address for notices.. we can use that here
instead of doing it long hand.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2022-03-06 12:08:09 UTC
Created attachment 131405 [details] [review]
Bug 17648: (QA follow-up) Restore imediate sending of the notice

The original notice was sent using SendAlerts, which triggers
immediately on submission and doesn't wait for the cron task.

This patch restores that immediacy and also fixes a bug in the imports
on the original patch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Fridolin Somers 2022-03-17 21:23:33 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑
Comment 19 Kyle M Hall (khall) 2022-03-25 13:33:22 UTC
Pushed to 21.11.x for 21.11.05