[Bug 17970] New: GetPreparedLetter does not warn when expected
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Bug ID: 17970 Summary: GetPreparedLetter does not warn when expected Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org
From C4::Letters::GetPreparedLetter:
my $tables = $params{tables}; my $substitute = $params{substitute}; $tables || $substitute || $repeat or carp( "ERROR: nothing to substitute - both 'tables' and 'substitute' are empty" ), return; So if the parameter tables or substitute is passed but does not contain anything, it will not warn as expected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59422 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59422&action=edit Bug 17970: Add tests to highlight the problem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59423&action=edit Bug 17970: Fix GetPreparedLetter behavior if nothing to substitute
From C4::Letters::GetPreparedLetter:
my $tables = $params{tables}; my $substitute = $params{substitute}; $tables || $substitute || $repeat or carp( "ERROR: nothing to substitute - both 'tables' and 'substitute' are empty" ), return; So if the parameter tables or substitute is passed but does not contain anything, it will not warn as expected. Test plan: 1/ Apply the patch with tests 2/ Confirm that they do not pass 3/ Apply this patch 4/ Confirm that the tests now pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59422|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59424&action=edit Bug 17970: Add tests to highlight the problem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59424|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59425 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59425&action=edit Bug 17970: Add tests to highlight the problem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17971 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17971 [Bug 17971] TT syntax for notices - Add support for plurals -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17965 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17965 [Bug 17965] TT syntax for notices - Prove that DUEDGST is compatible -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59425|0 |1 is obsolete| | --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 59481 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59481&action=edit Bug 17970: Add tests to highlight the problem Depends on 17958 Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59423|0 |1 is obsolete| | --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 59482 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59482&action=edit Bug 17970: Fix GetPreparedLetter behavior if nothing to substitute
From C4::Letters::GetPreparedLetter:
my $tables = $params{tables}; my $substitute = $params{substitute}; $tables || $substitute || $repeat or carp( "ERROR: nothing to substitute - both 'tables' and 'substitute' are empty" ), return; So if the parameter tables or substitute is passed but does not contain anything, it will not warn as expected. Test plan: 1/ Apply the patch with tests 2/ Confirm that they do not pass 3/ Apply this patch 4/ Confirm that the tests now pass Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17958 CC| |mtompset@hotmail.com Status|Needs Signoff |Signed Off Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17958 [Bug 17958] Add the Koha::Notice::Template[s] packages (letter table) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Bug 17970 depends on bug 17958, which changed state. Bug 17958 Summary: Add the Koha::Notice::Template[s] packages (letter table) https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17958 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59481|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 60976 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60976&action=edit Bug 17970: Add tests to highlight the problem Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59482|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 60977 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60977&action=edit Bug 17970: Fix GetPreparedLetter behavior if nothing to substitute
From C4::Letters::GetPreparedLetter:
my $tables = $params{tables}; my $substitute = $params{substitute}; $tables || $substitute || $repeat or carp( "ERROR: nothing to substitute - both 'tables' and 'substitute' are empty" ), return; So if the parameter tables or substitute is passed but does not contain anything, it will not warn as expected. Test plan: 1/ Apply the patch with tests 2/ Confirm that they do not pass 3/ Apply this patch 4/ Confirm that the tests now pass Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Patch complexity|--- |Small patch CC| |m.de.rooy@rijksmuseum.nl --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Not really sure if we need this. But no blocker. Note that you also have wantlibrarian, which triggers an action but will not be allowed on itself now. And we still replace OPACBaseURL and call _process_tt if we do not pass table/substitute/repeat.. I diagonally checked all calls of GetPreparedLetter and they all use one or more of the parameters in the condition. So no problems expected. The error message does not mention repeat (part of the condition). The POD does not tell me which parameters are mandatory. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17970 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |katrin.fischer@bsz-bw.de Status|Pushed to Master |RESOLVED --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Dependency is not in 16.11.x, so this should not be needed there. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org