[Bug 44092] New: Notices management: do not offer 'Resend' for notices without a patron
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44092 Bug ID: 44092 Summary: Notices management: do not offer 'Resend' for notices without a patron 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. In Notices management, the preview of a notice without a patron (e.g. the SHARE_INVITE notice) has a 'Resend' button. Clicking it lands on an empty Circulation page and the notice is not resent. The button should not be offered for notices without a patron. Test plan: 1) Set 'NoticesManagement' to 'Enable' and 'OpacAllowSharingPrivateLists' to 'Allow' 2) Log in to the OPAC as koha/koha (http://localhost:8080) 3) Click 'Lists' > 'Your lists' > 'New list', name 'My list', keep 'Private', click 'Save' 4) Click 'Lists' > 'Your lists', click the 'Share' link next to 'My list', enter 'friend@example.com' and click 'Send' 5) 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 invitation is now 'failed' 6) In the staff interface, go to 'More' > 'Tools' > 'Notices management' (http://localhost:8081/cgi-bin/koha/tools/notices.pl) 7) Click the subject 'Share list My list' 8) Confirm the preview has a 'Resend' button. Click it 9) Confirm you land on an empty Circulation page (circ/circulation.pl?borrowernumber=) and the notice was not resent 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=44092 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44092 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211543 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211543&action=edit Bug 44092: Offer 'Resend' in Notices management for notices with a patron or an address In Notices management, the preview of a notice without a patron, such as the invitation to a shared list, had a 'Resend' button. It posted to the patron's Notices tab, which needs a patron, so it landed on an empty Circulation page and the notice was not resent. A notice can be resent when it is not pending and it has somewhere to go: a patron, whose address is used when it is sent, or an address of its own. * Add Koha::Notice::Message->can_be_resent, used to offer the button * C4::Letters::ResendMessage only clears the address of an email notice that has a patron, to get it from the patron again. The address of a notice without a patron is its only address, and is kept * Add a resend action to tools/notices.pl, which does not need a patron. The notices are limited to the patrons the user can see, as for the other actions. Resending the notice of a patron needs edit_borrowers, as from the patron's Notices tab; a notice without a patron only needs view_generated_notices, which gives access to the page * Say whether the notice was queued to be resent To test: 1. Set 'NoticesManagement' to 'Enable' and 'OpacAllowSharingPrivateLists' to 'Allow' 2. Log in to the OPAC as koha/koha, create a private list and share it with friend@example.com 3. In a KTD shell, run: perl misc/cronjobs/process_message_queue.pl (KTD has no mail server, so the invitation is now 'failed') 4. Go to More > Tools > Notices management and click the subject 'Share list ...' 5. Without the patch, 'Resend' lands on an empty Circulation page and the notice is not resent 6. Apply the patch, run restart_all, and try again: you stay in Notices management, with a message saying the notice is queued to be resent. The notice is pending, still for friend@example.com 7. Do the same for the notice of a patron (for example send a welcome notice): the notice is pending, and gets the address of the patron when sent 8. Confirm a pending notice, and a notice with no patron and no address, are not offered 'Resend' 9. As a staff member with 'view_generated_notices' and 'view_borrower_infos_from_any_libraries' but not 'edit_borrowers', confirm 'Resend' is offered for the invitation but not for the notice of a patron 10. Run: prove t/db_dependent/Koha/Notice/Message.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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44092 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44092 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44092 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #211543|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44092 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 211562 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211562&action=edit Bug 44092: Offer 'Resend' in Notices management for notices with a patron or an address In Notices management, the preview of a notice without a patron, such as the invitation to a shared list, had a 'Resend' button. It posted to the patron's Notices tab, which needs a patron, so it landed on an empty Circulation page and the notice was not resent. A notice can be resent when it is not pending and it has somewhere to go: a patron, whose address is used when it is sent, or an address of its own. * Add Koha::Notice::Message->can_be_resent, used to offer the button * C4::Letters::ResendMessage only clears the address of an email notice that has a patron, to get it from the patron again. The address of a notice without a patron is its only address, and is kept * Add a resend action to tools/notices.pl, which does not need a patron. The notices are limited to the patrons the user can see, as for the other actions. Resending the notice of a patron needs edit_borrowers, as from the patron's Notices tab; a notice without a patron only needs view_generated_notices, which gives access to the page * Say whether the notice was queued to be resent To test: 1. Set 'NoticesManagement' to 'Enable' and 'OpacAllowSharingPrivateLists' to 'Allow' 2. Log in to the OPAC as koha/koha, create a private list and share it with friend@example.com 3. In a KTD shell, run: perl misc/cronjobs/process_message_queue.pl (KTD has no mail server, so the invitation is now 'failed') 4. Go to More > Tools > Notices management and click the subject 'Share list ...' 5. Without the patch, 'Resend' lands on an empty Circulation page and the notice is not resent 6. Apply the patch, run restart_all, and try again: you stay in Notices management, with a message saying the notice is queued to be resent. The notice is pending, still for friend@example.com 7. Do the same for the notice of a patron (for example send a welcome notice): the notice is pending, and gets the address of the patron when sent 8. Confirm a pending notice, and a notice with no patron and no address, are not offered 'Resend' 9. As a staff member with 'view_generated_notices' and 'view_borrower_infos_from_any_libraries' but not 'edit_borrowers', confirm 'Resend' is offered for the invitation but not for the notice of a patron 10. Run: prove t/db_dependent/Koha/Notice/Message.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 watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44092 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |44089 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44089 [Bug 44089] Notices management: conversion link in delivery note is lost -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44092 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |44093 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44093 [Bug 44093] Notices management: avoid rendering hidden frame and queries for every listed notice -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org