[Bug 43736] New: Reports should use the Print format when rendering with a template
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43736 Bug ID: 43736 Summary: Reports should use the Print format when rendering with a template Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Keywords: regression Severity: normal Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com Depends on: 34136 Target Milestone: --- When the option to render a report within the staff interface with a template was added in Bug 34136, it used the Print format of the selected notice template. Now it's using email instead. It should use Print when rendering a report to view (and possibly print) within the staff interface. This may have been caused by Bug 38121. To recreate, start with the test plan on Bug 34136: 3) Create a new notice template using the new "Report" option from the "New notice" pulldown. 4) In the "Print" area, paste the following template: [% FOREACH b IN data %] <div class="panel panel-default"> <div class="panel-heading">[% b.surname %], [% b.firstname %]</div> <div class="panel-body">Expiration: [% b.dateexpiry %]</div> <div class="panel-footer">ID: [% b.borrowernumber %]</div> </div> [% END %] 5) Create a report with the query: SELECT surname, firstname, dateexpiry, borrowernumber FROM borrowers 6) Once the report is saved, use the new "Run with template" option to select the template you just created. You'll find that selecting your template from the Run With Template button has no effect. But if you move your content from step 4 to Email, the template works. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 [Bug 34136] Add ability to render a report using a notice template -- 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=43736 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=43739 -- 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=43736 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |olivia.reynolds@openfifth.c | |o.uk --- Comment #1 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Thanks for filing this follow-up bug. I've had a look and I think the issue is around Bug 38621 changing from looking templates up by ID to by code. The latter lets us look the template up respecting branchcode and language, but also means we have to decide on the message transport type (email or print). GetPreparedLetter defaults to email, which explains the new behaviour, whereas before it was possible to select either the print or email template from the dropdown, as they had separate IDs and would trigger their respective templates. Regardless of anything else, it's an issue with my patches for Bug 38621 that the templates aren't listed by code, so you can see an entry for both the print and email versions of a template and both will trigger the email version. Besides that, I think we have to choose between: - Mandating report templates in the web interface are email rather than print. - Mandating report templates in the web interface are print rather than email. - Restoring the previous behaviour of showing all report template IDs and reworking GetPreparedLetter to allow selecting by ID. -- 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=43736 --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I've also filed Bug 43739 - Each notice template should only be shown once in reports Run With Template dropdown My preference would be for your second option: mandating report templates in the web interface are print rather than email. It doesn't make sense to me to default to the Email template when you're not emailing the content and I don't think we need to complexify things by offering users the choice between two defined formats. If Bug 43728 (runreports.pl cronjob should be able to apply reports templates) moves forward, it would make sense to use he Email format there. -- 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=43736 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |38621 --- Comment #3 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Testing on 25.11, reports previously allowed *any* format to be used. Based on that information, Olivia's 3rd option would be most accurately restoring previous behavior Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38621 [Bug 38621] [% today %] variable unavailable in report templates -- 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=43736 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |olivia.reynolds@openfifth.c |ity.org |o.uk Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch Sponsorship status|--- |Sponsored Comma delimited| |Open Fifth list of Sponsors| | -- 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=43736 --- Comment #4 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 207383 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207383&action=edit Bug 43736: Restore existing report template selection Bug 38621 changed report templates to be based off of the code. This meant we lost the functionality of choosing between the email and print versions of each template. This restores the previous behaviour, where all report templates were displayed and keyed by ID. Test plan: 1. Under Tools > Notices and Slips, create a new notice in the Reports module. Choose a code and a name, and add distinct subjects and contents for both Email and Print. For example, "Email: [% today %]" and "Print: [% today %]". 2. Under Reports, create a new report from SQL with a name and the following query: SELECT 1; 3. Open the "Run with template" dropdown for the report, and verify you see the name of your created notice twice. 4. Run each of the two versions of your notice, and verify they both run the Email version. 5. Apply patch and refresh. 6. Verify there are still two versions of your notice in the dropdown. 7. Verify that one version of the notice runs the Email template, and the other the Print template. 8. Verify that using the Download dropdown and selecting "Rendered template" for each version of the notice produces a downloaded file with the correct rendered contents. Sponsored-by: Open Fifth -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43736 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43739 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43739 [Bug 43739] Each notice template should only be shown once in reports Run With Template dropdown -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43736 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Reports should use the |Reports should allow use of |Print format when rendering |any format when rendering |with a template |with a template -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43736 --- Comment #5 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Apologies for the new patch, I'd left an obsolete TODO comment in by mistake. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43736 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #207383|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=43736 --- Comment #6 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 207389 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207389&action=edit Bug 43736: Restore existing report template selection Bug 38621 changed report templates to be based off of the code. This meant we lost the functionality of choosing between the email and print versions of each template. This restores the previous behaviour, where all report templates were displayed and keyed by ID. Test plan: 1. Under Tools > Notices and Slips, create a new notice in the Reports module. Choose a code and a name, and add distinct subjects and contents for both Email and Print. For example, "Email: [% today %]" and "Print: [% today %]". 2. Under Reports, create a new report from SQL with a name and the following query: SELECT 1; 3. Open the "Run with template" dropdown for the report, and verify you see the name of your created notice twice. 4. Run each of the two versions of your notice, and verify they both run the Email version. 5. Apply patch and refresh. 6. Verify there are still two versions of your notice in the dropdown. 7. Verify that one version of the notice runs the Email template, and the other the Print template. 8. Verify that using the Download dropdown and selecting "Rendered template" for each version of the notice produces a downloaded file with the correct rendered contents. Sponsored-by: Open Fifth -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43736 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43744 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43744 [Bug 43744] Make report object available when running report with template -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43736 Andrew Fuerste-Henry <andrew@bywatersolutions.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=43736 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #207389|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=43736 --- Comment #7 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 207402 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207402&action=edit Bug 43736: Restore existing report template selection Bug 38621 changed report templates to be based off of the code. This meant we lost the functionality of choosing between the email and print versions of each template. This restores the previous behaviour, where all report templates were displayed and keyed by ID. Test plan: 1. Under Tools > Notices and Slips, create a new notice in the Reports module. Choose a code and a name, and add distinct subjects and contents for both Email and Print. For example, "Email: [% today %]" and "Print: [% today %]". 2. Under Reports, create a new report from SQL with a name and the following query: SELECT 1; 3. Open the "Run with template" dropdown for the report, and verify you see the name of your created notice twice. 4. Run each of the two versions of your notice, and verify they both run the Email version. 5. Apply patch and refresh. 6. Verify there are still two versions of your notice in the dropdown. 7. Verify that one version of the notice runs the Email template, and the other the Print template. 8. Verify that using the Download dropdown and selecting "Rendered template" for each version of the notice produces a downloaded file with the correct rendered contents. Sponsored-by: Open Fifth Signed-off-by: Barbara Johnson <Barbara.Johnson@bedfordtx.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43736 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |andrew@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43736 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #207402|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=43736 --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 207404 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207404&action=edit Bug 43736: Restore existing report template selection Bug 38621 changed report templates to be based off of the code. This meant we lost the functionality of choosing between the email and print versions of each template. This restores the previous behaviour, where all report templates were displayed and keyed by ID. Test plan: 1. Under Tools > Notices and Slips, create a new notice in the Reports module. Choose a code and a name, and add distinct subjects and contents for both Email and Print. For example, "Email: [% today %]" and "Print: [% today %]". 2. Under Reports, create a new report from SQL with a name and the following query: SELECT 1; 3. Open the "Run with template" dropdown for the report, and verify you see the name of your created notice twice. 4. Run each of the two versions of your notice, and verify they both run the Email version. 5. Apply patch and refresh. 6. Verify there are still two versions of your notice in the dropdown. 7. Verify that one version of the notice runs the Email template, and the other the Print template. 8. Verify that using the Download dropdown and selecting "Rendered template" for each version of the notice produces a downloaded file with the correct rendered contents. Sponsored-by: Open Fifth Signed-off-by: Barbara Johnson <Barbara.Johnson@bedfordtx.gov> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43736 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_26_05_candidate, | |rel_26_11_candidate -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org