[Bug 15429] New: sub _parseletter should not change referenced values
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Bug ID: 15429 Summary: sub _parseletter should not change referenced values Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org In C4/Letters.pm, sub _parseletter changes values that are passed by reference. E.g. patron's expiry date can change from iso format to syspref format,leading to strange behaviour in the calling routines (see Bug 15423). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 45994 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45994&action=edit Bug 15429 - sub _parseletter should not change referenced values In C4/Letters.pm, sub _parseletter changes values that are passed by reference. E.g. patron's expiry date can change from iso format to syspref format, leading to strange behaviour in the calling routines (see Bug 15423). This patch makes sub _parseletter work on a copy of the referenced values. (Submitted to get feedback - is this the way to go?) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=15423 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 --- Comment #2 from Marc Véron <veron@veron.ch> --- To reproduce an issue with strange value changes (patron's expiry date) see Bug 15423. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |costalc@gmail.com --- Comment #3 from Marc Véron <veron@veron.ch> --- *** Bug 15423 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15432 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15432 [Bug 15432] t/db_dependent/Letters.t depends on external data/configuration -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #4 from Marc Véron <veron@veron.ch> --- Switching to "Needs Signoff" Test plan: Reproduce without this patch: - Try to repruduce issue in Bug 15423 (comment #2) - make sure that patron with batch checkout permissionhas nothing checked out - Go to batch checkout - enter 2 valid barcodes - Then enter a line with one space character - Then enter one more empty line or a barcode Example: e.g. 1 2 3 ('empty' line contains one space character) Expected result: Software error The given date (13/05/2022 00:00) does not match the date format (iso) at /usr/share/kohaclone/Koha/DateUtils.pm line 153. - If not yet done, apply patch 15432 - prove -v t/db_dependent/Letters.t Expected Result: OK Test with patch: - apply patch - try to reproduce software error above Expected result: No software error, checkouts OK - prove -v t/db_dependent/Letters.t Expected result: OK (Note: I did not manage to create a test to reproduce Bug 15423 in Letters.t) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=15433 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |derrynj@gmail.com --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 15433 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |critical --- Comment #6 from Marc Véron <veron@veron.ch> --- Setting to 'critical' because Bug 15433 (resolved by this patch) has status 'critical' -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45994|0 |1 is obsolete| | --- Comment #7 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 46072 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46072&action=edit Bug 15429 - sub _parseletter should not change referenced values In C4/Letters.pm, sub _parseletter changes values that are passed by reference. E.g. patron's expiry date can change from iso format to syspref format, leading to strange behaviour in the calling routines (see Bug 15423). This patch makes sub _parseletter work on a copy of the referenced values. (Submitted to get feedback - is this the way to go?) Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Good solution to real time bomb. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 --- Comment #8 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 46073 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46073&action=edit Bug 15429 UT for _parseletter modifying its parameter Before/after applying the related patch, do: prove -v t/db_dependent/Letters.t -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46072|0 |1 is obsolete| | Attachment #46073|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 46076 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46076&action=edit Bug 15429 - sub _parseletter should not change referenced values In C4/Letters.pm, sub _parseletter changes values that are passed by reference. E.g. patron's expiry date can change from iso format to syspref format, leading to strange behaviour in the calling routines (see Bug 15423). This patch makes sub _parseletter work on a copy of the referenced values. (Submitted to get feedback - is this the way to go?) Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Good solution to real time bomb. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 46077 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46077&action=edit Bug 15429 UT for _parseletter modifying its parameter Before/after applying the related patch, do: prove -v t/db_dependent/Letters.t Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- We should not do that, but it is definitely the safest and easiest way to go. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|15432 |6810 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Seems to have been introduced by 6810. Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6810 [Bug 6810] Send membership expiry reminder notices http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15432 [Bug 15432] t/db_dependent/Letters.t depends on external data/configuration -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #12)
Seems to have been introduced by 6810.
waitingdate was already modified before bug 6810. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master, thanks Marc! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com Status|Pushed to Master |Pushed to Stable --- Comment #15 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.2 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #16 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.8. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 --- Comment #17 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 46160 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46160&action=edit Bug 15429 Followup to avoid test failing -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15429 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15466 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15466 [Bug 15466] Suggestions.t is failing -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org