Bug 10555 - overdue_notices -h does not list all options
Summary: overdue_notices -h does not list all options
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-09 09:07 UTC by Mathieu Saby
Modified: 2022-06-23 07:13 UTC (History)
2 users (show)

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


Attachments
[PATCH]Bug 10555: Update list of options displayed by overdue_notices.pl --help (2.17 KB, patch)
2013-09-15 11:35 UTC, Mathieu Saby
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Saby 2013-07-09 09:07:06 UTC
perl overdue_notices -h does not list all options.

The following options are not listed :

-v
-list-all
-t
-date

M. Saby
Comment 1 Mathieu Saby 2013-09-15 11:35:50 UTC
Created attachment 21108 [details] [review]
[PATCH]Bug 10555: Update list of options displayed by overdue_notices.pl --help

Very cosmetic patch...
overdue_notices.pl --help display
- an "usage" line
- a first list of options, with short descriptions
- a long list of options, with long descriptions

4 options are only in the 3rd, long list. They should also be in the "usage" line and in the short list.

To test :
run perl overdue_notice.pl --help and check all the options are displayed


M. Saby
Comment 2 Marcel de Rooy 2013-09-23 12:22:31 UTC
Mathieu: 

Two code snippets:

1: GetOptions(
    'date'           => \$date,

2: if ($date){
    $date=$dbh->quote($date);
}
else {
    $date="NOW()";
}

It seems like the date parameter gets not correctly passed in. If you specify -date 23-09-2013, it will have value 1 since no value is defined in GetOptions.
Since you document it, could you please verify or correct?

Thanks.
Comment 3 Mathieu Saby 2013-09-23 13:05:06 UTC
Well, this patch was very cosmetic and did not touch code itself.
If something is broken, it must be broken in master.
So, we should check on master, and fill a new bug if the issue is confirmed.

Mathieu
Comment 4 Marcel de Rooy 2013-09-23 13:11:16 UTC
(In reply to mathieu saby from comment #3)
> Well, this patch was very cosmetic and did not touch code itself.

I was just thinking: If you advertize an option that does not work, probably you should better not advertize it yet.
Comment 5 Mathieu Saby 2013-09-23 13:27:18 UTC
ok, understood. But I would prefer fixing the option ;-)
I will take a look

Mathieu
Comment 6 Jonathan Druart 2015-07-15 07:37:31 UTC
Just a note: now the --date parameter works as expected.