[Bug 31448] New: Add option to re-send email receipt when UseEmailReceipts is enabled
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Bug ID: 31448 Summary: Add option to re-send email receipt when UseEmailReceipts is enabled Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org We already have a 'Print' option in the actions available on transactions in the borrower accounts page. It would be nice to re-trigger the email receipt if UseEmailReceipts is enabled too. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 139702 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139702&action=edit Bug 31448: Replace 'Print' with 'Receipt' dropdown This patch replaces the 'Print' button with a 'Receipt' menu dropdown exposing 'Print' and 'Email' options when `UseEmailReceipts` is enabled Test plan 1. Enable `UseEmailReceipts` 2. Navigate to a patron with paid charges 3. Note the new dropdown 'Receipt' menu 4. Confirm 'Print' works as expected 5. Confirm 'Email' works as expected -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I quickly threw this together as a counterpart to bug 30619 which adds the option to email from the UI for the Point Of Sale screen. Untested; I'll try to return to it soon, but wanted to leave it hear in case anyone wanted to continue in my absence. The 'fa-receipt' font icon doesn't work for some reason.. not sure why yet. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30619 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Marius <marius.mandrescu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marius.mandrescu@inlibro.co | |m Status|Needs Signoff |Failed QA --- Comment #3 from Marius <marius.mandrescu@inlibro.com> --- Points 1, 2 and 3 work very well. But points 4 and 5 did not work. When I click on "Print" or "Email" it makes an error 500. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139702|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 147427 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147427&action=edit Bug 31448: Replace 'Print' with 'Receipt' dropdown This patch replaces the 'Print' button with a 'Receipt' menu dropdown exposing 'Print' and 'Email' options when `UseEmailReceipts` is enabled Test plan 1. Enable `UseEmailReceipts` 2. Navigate to a patron with paid charges 3. Note the new dropdown 'Receipt' menu 4. Confirm 'Print' works as expected 5. Confirm 'Email' works as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Reworked and tested.. all seems to be working now for me. Thanks for showing interest Marius -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147427|0 |1 is obsolete| | --- Comment #6 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 147488 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147488&action=edit Bug 31448: Replace 'Print' with 'Receipt' dropdown This patch replaces the 'Print' button with a 'Receipt' menu dropdown exposing 'Print' and 'Email' options when `UseEmailReceipts` is enabled Test plan 1. Enable `UseEmailReceipts` 2. Navigate to a patron with paid charges 3. Note the new dropdown 'Receipt' menu 4. Confirm 'Print' works as expected 5. Confirm 'Email' works as expected Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |sally.healey@cheshireshared | |services.gov.uk --- Comment #7 from Sally <sally.healey@cheshiresharedservices.gov.uk> --- Works great, thanks for the patch. Signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- There are some small 'glitches' here: * The email option is visible even if the patron has no email address. But: this matches the current behavior as the initial email is also created in any case. So if we want to fix this, we should probably do it on a separate bug and catch the initial email and the resend one at the same time. * When we resend an email from notices tab (look at the preview of a failed notice, 'resend' button on the right), we resend the original notice. This feature creates a new notice. I think this is ok, since we don't have the ID of the original notice and it's not a big issue to have a separate one, it might even be good to give more history. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #8)
There are some small 'glitches' here:
* The email option is visible even if the patron has no email address. But: this matches the current behavior as the initial email is also created in any case. So if we want to fix this, we should probably do it on a separate bug and catch the initial email and the resend one at the same time.
* When we resend an email from notices tab (look at the preview of a failed notice, 'resend' button on the right), we resend the original notice. This feature creates a new notice. I think this is ok, since we don't have the ID of the original notice and it's not a big issue to have a separate one, it might even be good to give more history.
* Code duplication: the code for sending the notices is not duplicated in Account.pm and boraccount.pl. This is not ideal. It might be better to move it into a separate method and call it from both places? Setting to failed QA for feedback. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- That's actually a fair bit more work Katrin.. work I think should be undertaken as a distinct bug after the move to separate out Account::Lines to Account::Credits and Account::Debits. * We would need to support credits taken via point of sale (thus having no related patron). * We would also need to add message passing to the object to allow chaining whilst including additional information in the returned object. For a relatively simple enhancement, we're now jumping into days of work territory. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, actually I only point I wanted to talk about was number 3, the code duplication. For the other 2 I already noted that I would be ok with keeping things as they are. And only talking about this piece of code here: my $receipt_sent = 0; +if ( $action eq 'send_receipt' ) { + my $credit_id = scalar $input->param('accountlines_id'); + my $credit = Koha::Account::Lines->find($credit_id); + my @credit_offsets = + $credit->credit_offsets( { type => 'APPLY' } )->as_list; + if ( + my $letter = C4::Letters::GetPreparedLetter( + module => 'circulation', + letter_code => uc( "ACCOUNT_" . $credit->credit_type_code ), + message_transport_type => 'email', + lang => $patron->lang, + tables => { + borrowers => $patron->borrowernumber, + branches => C4::Context::mybranch, + }, + substitute => { + credit => $credit, + offsets => \@credit_offsets, + }, + ) + ) + { + my $message_id = C4::Letters::EnqueueLetter( + { + letter => $letter, + borrowernumber => $patron->borrowernumber, + message_transport_type => 'email', + } + ); + C4::Letters::SendQueuedMessages( { message_id => $message_id } ); + $receipt_sent = 1; + } + else { + $receipt_sent = -1; + } +} Compared to here: https://git.koha-community.org/Koha-community/Koha/src/branch/master/Koha/Ac... Maybe it's not worth moving it into a separate thing, not sure. Maybe I missed some major differences? But now also a little confused about the lot of other clean-up you were talking about? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33473 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33473 [Bug 33473] Allow to send email receipts for payments/writeoff manually instead of automatically -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33474 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147488|0 |1 is obsolete| | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 149393 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149393&action=edit Bug 31448: Replace 'Print' with 'Receipt' dropdown This patch replaces the 'Print' button with a 'Receipt' menu dropdown exposing 'Print' and 'Email' options when `UseEmailReceipts` is enabled Test plan 1. Enable `UseEmailReceipts` 2. Navigate to a patron with paid charges 3. Note the new dropdown 'Receipt' menu 4. Confirm 'Print' works as expected 5. Confirm 'Email' works as expected Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Needs documenting --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Enhancements, won't be backported to 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |**Sponsored by** *PTFS release notes| |Europe* -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |Caroline Cyr La Rose contact| | Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/691 Status|Needs documenting |RESOLVED CC| |caroline.cyr-la-rose@inlibr | |o.com Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org