Bug 21322 - process_message_queue.pl --type should take an argument
Summary: process_message_queue.pl --type should take an argument
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Magnus Enger
QA Contact: Josef Moravec
URL:
Keywords:
Depends on: 19955
Blocks: 37075
  Show dependency treegraph
 
Reported: 2018-09-06 13:18 UTC by Magnus Enger
Modified: 2024-06-14 10:51 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 21322 - process_message_queue.pl --type should take an argument (1.34 KB, patch)
2018-09-06 13:29 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 21322: process_message_queue.pl --type should take an argument (1.40 KB, patch)
2018-09-06 16:35 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 21322: process_message_queue.pl --type should take an argument (1.39 KB, patch)
2018-09-26 11:54 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 21322: process_message_queue.pl --type should take an argument (1.45 KB, patch)
2018-10-02 17:39 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2018-09-06 13:18:25 UTC
If you run process_message_queue.pl -h you get this, among other things:

  -t --type: If supplied, only processes this type of message ( email, sms )

But if you try to use --type like this:

  process_message_queue.pl -v --type=sms" <instance>

You get this error:

  Option type does not take an argument

This is because the setup of the type argument is wrong. This: 

    't|type'          => \$type,

should be this:

    't|type:s'          => \$type,
Comment 1 Magnus Enger 2018-09-06 13:29:21 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2018-09-06 16:35:48 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2018-09-14 10:02:25 UTC
Magnus:
Please fix:

From: Your Full Name <magnus@libriotech.no>
Comment 4 Magnus Enger 2018-09-26 11:54:43 UTC
Created attachment 79406 [details] [review]
Bug 21322: process_message_queue.pl --type should take an argument

The help for this script says:
-t --type: If supplied, only processes this type of message ( email, sms )

Currently, the type argument is set up wrong, so it does not look
for an argument. This patch fixes that.

To test, run this command (should work in kohadevbox) or something
similar:

$ sudo koha-shell -c "perl \
/home/vagrant/kohaclone/misc/cronjobs/process_message_queue.pl -v \
--type=sms" kohadev

This should give the following error: "Option type does not take an argument".
Apply the patch and run the same command again. This should not give an
error.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 5 Magnus Enger 2018-09-26 11:56:15 UTC
Author info should be fixed now. Thanks for noticing!
Comment 6 Josef Moravec 2018-10-02 17:39:51 UTC
Created attachment 79847 [details] [review]
Bug 21322: process_message_queue.pl --type should take an argument

The help for this script says:
-t --type: If supplied, only processes this type of message ( email, sms )

Currently, the type argument is set up wrong, so it does not look
for an argument. This patch fixes that.

To test, run this command (should work in kohadevbox) or something
similar:

$ sudo koha-shell -c "perl \
/home/vagrant/kohaclone/misc/cronjobs/process_message_queue.pl -v \
--type=sms" kohadev

This should give the following error: "Option type does not take an argument".
Apply the patch and run the same command again. This should not give an
error.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Nick Clemens (kidclamp) 2018-10-05 16:27:11 UTC
Awesome work all!

Pushed to master for 18.11
Comment 8 Martin Renvoize (ashimema) 2018-10-08 08:50:14 UTC
Pushed to 18.05.x for 18.05.05
Comment 9 Fridolin Somers 2018-10-11 13:50:17 UTC
Pushed to 17.11.x for 17.11.11