[Bug 30366] New: Warn when running automatic_item_modification_by_age.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30366 Bug ID: 30366 Summary: Warn when running automatic_item_modification_by_age.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Installation and upgrade (command-line installer) Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org Blocks: 25790 When using the ./misc/cronjobs/automatic_item_modification_by_age.pl -v after setting up rules under tools > Automatic item modifications by age the script outputs several lines of warnings: With patch from 22827: Use of uninitialized value in string eq at /kohadevbox/koha/C4/Items.pm line 1856. Master as of today: Use of uninitialized value in string eq at /kohadevbox/koha/C4/Items.pm line 1852. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25790 [Bug 25790] [OMNIBUS] warnings removal -- 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=30366 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Severity|enhancement |minor Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m -- 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=30366 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=30366 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 133844 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133844&action=edit Bug 30366: Remove warn when running automatic_item_modification_by_age.pl When using the ./misc/cronjobs/automatic_item_modification_by_age.pl -v after setting up rules under Tools > Automatic item modifications by age the script outputs several lines of warnings: Use of uninitialized value in string eq at /kohadevbox/koha/C4/Items.pm line 1864. This is because even when there is no condition defined, modification rule is stored with empty hash, like : [{"substitutions":[{"field":"items.new_status","value":"0"}],"conditions":[{}],"age":"60","agefield":"items.dateaccessioned"}] Test plan : 1) Go to Tools > Automatic item modifications by age 2) Create a rule with no conditions, just a substitution 3) Run misc/cronjobs/automatic_item_modification_by_age.pl -v 4) Check there is no warning 5) Edit the rule to add a condition 6) Run misc/cronjobs/automatic_item_modification_by_age.pl -v 7) Check the condition is applied -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30366 Owen Leonard <oleonard@myacpl.org> 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=30366 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #133844|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 133899 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133899&action=edit Bug 30366: Remove warn when running automatic_item_modification_by_age.pl When using the ./misc/cronjobs/automatic_item_modification_by_age.pl -v after setting up rules under Tools > Automatic item modifications by age the script outputs several lines of warnings: Use of uninitialized value in string eq at /kohadevbox/koha/C4/Items.pm line 1864. This is because even when there is no condition defined, modification rule is stored with empty hash, like : [{"substitutions":[{"field":"items.new_status","value":"0"}],"conditions":[{}],"age":"60","agefield":"items.dateaccessioned"}] Test plan : 1) Go to Tools > Automatic item modifications by age 2) Create a rule with no conditions, just a substitution 3) Run misc/cronjobs/automatic_item_modification_by_age.pl -v 4) Check there is no warning 5) Edit the rule to add a condition 6) Run misc/cronjobs/automatic_item_modification_by_age.pl -v 7) Check the condition is applied Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30366 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #133899|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 133901 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133901&action=edit Bug 30366: Remove warn when running automatic_item_modification_by_age.pl When using the ./misc/cronjobs/automatic_item_modification_by_age.pl -v after setting up rules under Tools > Automatic item modifications by age the script outputs several lines of warnings: Use of uninitialized value in string eq at /kohadevbox/koha/C4/Items.pm line 1864. This is because even when there is no condition defined, modification rule is stored with empty hash, like : [{"substitutions":[{"field":"items.new_status","value":"0"}],"conditions":[{}],"age":"60","agefield":"items.dateaccessioned"}] Test plan : 1) Go to Tools > Automatic item modifications by age 2) Create a rule with no conditions, just a substitution 3) Run misc/cronjobs/automatic_item_modification_by_age.pl -v 4) Check there is no warning 5) Edit the rule to add a condition 6) Run misc/cronjobs/automatic_item_modification_by_age.pl -v 7) Check the condition is applied Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30366 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Trivial and clear fix, works as expected, no regressions found and QA scripts happy. PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30366 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30366 --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30366 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|22.05.00 |22.05.00,21.11.06 released in| | CC| |kyle@bywatersolutions.com --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30366 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|25790 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25790 [Bug 25790] [OMNIBUS] warnings removal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30366 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25790 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25790 [Bug 25790] [OMNIBUS] warnings removal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30366 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to stable |Needs documenting --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30366 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Documentation| |Martin Renvoize contact| | Resolution|--- |FIXED --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Warning cleanup, no documentation change required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org