https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44095 Bug ID: 44095 Summary: Deduplicate 'Convert to print' handling in members/notices.pl and tools/notices.pl 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. The 'Convert to print' handling is duplicated. members/notices.pl and tools/notices.pl both have the same 'cud-convert_to_print' block: it calls $message->convert_to_print in a try/catch and turns the exceptions (Koha::Exceptions::Notice::NoConversionTemplate, Koha::Exceptions::Notice::ConversionTemplateError, anything else) into the same 'no_template' / 'template_error' / 'failed' result. members/notices.tt and tools/notices.tt then repeat the same alerts for each of those results. This should be refactored into a single shared implementation (and a shared template include for the alerts). No behaviour change is expected. 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.