[Bug 44089] New: Notices management: conversion link in delivery note is lost
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44089 Bug ID: 44089 Summary: Notices management: conversion link in delivery note is lost Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: martin.renvoize@openfifth.co.uk Depends on: 33260 Target Milestone: --- Follow-up to bug 33260, reported by Pedro Amorim. After 'Convert to print', the 'Delivery note' links the two notices. The link is lost when gather_print_notices.pl processes the print notice, and when the original notice is resent. Test plan: 1) Set 'NoticesManagement' to 'Enable' 2) Edit patron 'koha' (cardnumber '42'), set 'Primary email' to 'test@example.com', click 'Save' (http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=edit_form&borrowernumber=51) 3) On the patron's page, click 'More' > 'Send welcome notice' 4) In a KTD shell, run: perl misc/cronjobs/process_message_queue.pl KTD has no mail server, so it prints an SMTP error and the notice is now 'failed' 5) Go to 'More' > 'Tools' > 'Notices management', click the 'Convert to print' button on the WELCOME notice (http://localhost:8081/cgi-bin/koha/tools/notices.pl) 6) Confirm the email notice says 'Converted to print notice X' and the new 'print' notice says 'Converted from notice Y' 7) In a KTD shell, run: perl misc/cronjobs/gather_print_notices.pl /tmp 8) Reload Notices management. Confirm the 'print' notice is now 'printed' and 'Converted from notice Y' is gone from its 'Delivery note' 9) Click the subject of the email notice, then the 'Resend' button. Confirm 'Converted to print notice X' is gone Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33260 [Bug 33260] Show message queue on staff interface and make notices printable -- 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=44089 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211666 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211666&action=edit Bug 44089: Keep the link of a converted notice in its delivery note After 'Convert to print', the delivery note of the two notices links them: 'Converted to print notice X' and 'Converted from notice Y'. The link is the failure_code of the notices, and was lost: * by gather_print_notices.pl, which used C4::Letters::_set_message_status to mark the print notice as printed. That sets the failure_code too, to an empty one. It now only changes the status, as when printing from Notices management * when the original notice was resent. A converted notice is replaced by its print notice, sending it again would send it twice, and the link would still be lost once sent. ResendMessage does not resend it, can_be_resent (bug 44092) is false for it, and the 'Resend' button is not offered for it in the Notices tab of the patron either This depends on bug 44092, which adds can_be_resent. To test: 1. Set 'NoticesManagement' to 'Enable' 2. Edit patron 'koha' (cardnumber '42'), set 'Primary email' to 'test@example.com' and save 3. On the patron's page, click 'More' > 'Send welcome notice' 4. In a KTD shell, run: perl misc/cronjobs/process_message_queue.pl (KTD has no mail server, so the notice is now 'failed') 5. Go to More > Tools > Notices management and click 'Convert to print' on the WELCOME notice 6. Confirm the email notice says 'Converted to print notice X' and the new 'print' notice says 'Converted from notice Y' 7. In a KTD shell, run: perl misc/cronjobs/gather_print_notices.pl /tmp 8. Reload Notices management. Confirm the 'print' notice is 'printed' and still says 'Converted from notice Y' 9. Click the subject of the email notice, confirm there is no 'Resend' button, and 'Converted to print notice X' is still there. Check the Notices tab of the patron too 10. Run: prove t/db_dependent/misc/cronjobs/gather_print_notices.t t/db_dependent/Letters.t 11. Run: yarn cypress run --spec t/cypress/integration/Tools/NoticesManagement_spec.ts Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> -- 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=44089 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Depends on|33260 |44092 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33260 [Bug 33260] Show message queue on staff interface and make notices printable https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44092 [Bug 44092] Notices management: do not offer 'Resend' for notices without a patron -- 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=44089 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |33260 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33260 [Bug 33260] Show message queue on staff interface and make notices printable -- 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=44089 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=44089 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #211666|0 |1 is obsolete| | -- 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=44089 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 211682 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211682&action=edit Bug 44089: Keep the link of a converted notice in its delivery note After 'Convert to print', the delivery note of the two notices links them: 'Converted to print notice X' and 'Converted from notice Y'. The link is the failure_code of the notices, and was lost: * by gather_print_notices.pl, which used C4::Letters::_set_message_status to mark the print notice as printed. That sets the failure_code too, to an empty one. It now only changes the status, as when printing from Notices management * when the original notice was resent. A converted notice is replaced by its print notice, sending it again would send it twice, and the link would still be lost once sent. ResendMessage does not resend it, can_be_resent (bug 44092) is false for it, and the 'Resend' button is not offered for it in the Notices tab of the patron either This depends on bug 44092, which adds can_be_resent. To test: 1. Set 'NoticesManagement' to 'Enable' 2. Edit patron 'koha' (cardnumber '42'), set 'Primary email' to 'test@example.com' and save 3. On the patron's page, click 'More' > 'Send welcome notice' 4. In a KTD shell, run: perl misc/cronjobs/process_message_queue.pl (KTD has no mail server, so the notice is now 'failed') 5. Go to More > Tools > Notices management and click 'Convert to print' on the WELCOME notice 6. Confirm the email notice says 'Converted to print notice X' and the new 'print' notice says 'Converted from notice Y' 7. In a KTD shell, run: perl misc/cronjobs/gather_print_notices.pl /tmp 8. Reload Notices management. Confirm the 'print' notice is 'printed' and still says 'Converted from notice Y' 9. Click the subject of the email notice, confirm there is no 'Resend' button, and 'Converted to print notice X' is still there. Check the Notices tab of the patron too 10. Run: prove t/db_dependent/misc/cronjobs/gather_print_notices.t t/db_dependent/Letters.t 11. Run: yarn cypress run --spec t/cypress/integration/Tools/NoticesManagement_spec.ts Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.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=44089 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This fixes the delivery release notes| |notes and notice previews | |for notices when a notice | |is 1) converted to print, | |and 2) the | |misc/cronjobs/gather_print_ | |notices.pl script is used | |to generate the print | |notice (under both Tools > | |Notices management, and the | |notices section for a | |patron). | | | |Now when an email notice is | |converted to print and the | |gather_print_notices.pl | |script is used: | |- the delivery note is | |shown for the printed | |notice (the original email | |notice shows as "Converted | |to print notice X", and the | |printed notice shows as | |"Converted from notice X" - | |previously the delivery | |note for the print notice | |was removed when the script | |was run) | |- for the original email | |notice, the option to | |resend is removed | |(previously "Resend" was | |shown when you viewed the | |email notice) --- Comment #3 from David Nind <david@davidnind.com> --- I've attempted a release note - I hope I got the nuances correct! One thing I noted is that the "Resend" button is removed from the original email notice that was converted to print (as expected with this fix), but it is still on the replacement print notice. I assume that this is 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=44089 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |44095 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44095 [Bug 44095] Deduplicate 'Convert to print' handling in members/notices.pl and tools/notices.pl -- 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=44089 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|33260 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33260 [Bug 33260] Show message queue on staff interface and make notices printable -- 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=44089 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org