[Bug 16039] New: Quiet flag support for share_usage_with_koha_community.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 Bug ID: 16039 Summary: Quiet flag support for share_usage_with_koha_community.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: gmcharlt@gmail.com Reporter: srdjan@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=16039 --- Comment #1 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 48924 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48924&action=edit bug_16039 Added -q flag to share_usage_with_koha_community.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |srdjan@catalyst.net.nz --- Comment #2 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- To test: With UsageStats syspref set to No: * run misc/cronjobs/share_usage_with_koha_community.pl (withiout -q) - "The UsageStats system preference is not set." message with usage info should be output * run misc/cronjobs/share_usage_with_koha_community.pl -q - the output should be quiet -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48924|0 |1 is obsolete| | --- Comment #3 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 48926 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48926&action=edit bug_16039 Added -q flag to share_usage_with_koha_community.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #4 from Liz Rea <liz@catalyst.net.nz> --- Just noting the reasons for this patch - The people who get the cron mail for a given Koha server may or may not have anything to do with the library, or may be a support company who get many copies of this message. Being able to quiet this message means we can suppress unwanted cron email without missing out on other operational messages. It also allows the job to continue running, in the event that someone affiliated with the library does decide to change the syspref - the job will work immediately instead of requiring the system admin to re-enable the job. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 48926 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48926 bug_16039 Added -q flag to share_usage_with_koha_community.pl Review of attachment 48926: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=16039&attachment=48926) ----------------------------------------------------------------- Avoid scope creep. ::: misc/cronjobs/share_usage_with_koha_community.pl @@ +88,4 @@
=item B<-v|--verbose>
+Verbose mode
Why remove the period? It's not related to this patch? @@ +92,4 @@
=item B<-f|--force>
+Force the update
Why remove the period? It's not related to this patch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 48926 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48926 bug_16039 Added -q flag to share_usage_with_koha_community.pl Review of attachment 48926: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=16039&attachment=48926) ----------------------------------------------------------------- ::: misc/cronjobs/share_usage_with_koha_community.pl @@ +19,5 @@
) || pod2usage(1);
if ($help) { pod2usage(1); + exit;
Not required. Each of the following invocations of pod2usage() will print the "SYNOPSIS" section and any "OPTIONS" and/or "ARGUMENTS" sections to STDOUT and will exit with a status of 1: pod2usage(1); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Other than scope creep (period removals), and a not required exit, this works. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 M. Tompsett <mtompset@hotmail.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=16039 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48926|0 |1 is obsolete| | --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 49367 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49367&action=edit Bug 16039: Added -q flag to share_usage_with_koha_community.pl To test: With UsageStats syspref set to No: * run misc/cronjobs/share_usage_with_koha_community.pl (without -q) - "The UsageStats system preference is not set." message with usage info should be output * run misc/cronjobs/share_usage_with_koha_community.pl -q - the output should be quiet NOTE: See comment #7. 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=16039 --- Comment #9 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- No it is not related. However, some of the descriptions have dots, and some don't, which is inconsistent. My view is "polish while you're there", rather than creating a bug for two dots, especially when it incurs no cost. But I can remove that bit if you wish. Exit is there for two reasons: 1. if help is requested no point doing anything, and 2. without it exit status is non-0 (not that important but still) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Srdjan Jankovic from comment #9)
Exit is there for two reasons: 1. if help is requested no point doing anything, and 2. without it exit status is non-0 (not that important but still)
Good point. exit; is 0 status which is correct in my opinion. Okay. Whoever, take the sign off and run with it. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49367|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 49391 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49391&action=edit Bug 16039: Added -q flag to share_usage_with_koha_community.pl To test: With UsageStats syspref set to No: * run misc/cronjobs/share_usage_with_koha_community.pl (without -q) - "The UsageStats system preference is not set." message with usage info should be output * run misc/cronjobs/share_usage_with_koha_community.pl -q - the output should be quiet NOTE: See comment #7. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 49392 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49392&action=edit Bug 16039: Remove useless exit pod2usage will exit with the status given in parameter. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 --- Comment #13 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 49392 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49392 Bug 16039: Remove useless exit Review of attachment 49392: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=16039&attachment=49392) ----------------------------------------------------------------- ::: misc/cronjobs/share_usage_with_koha_community.pl @@ +19,4 @@
) || pod2usage(1);
if ($help) { + pod2usage(0);
Ooooo.... much cleaner. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16039 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m Status|Passed QA |Pushed to Master --- Comment #14 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - should be in the May 2016 release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org