Bug 11509 - koha-create should print better usage information
Summary: koha-create should print better usage information
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-09 13:56 UTC by Tomás Cohen Arazi
Modified: 2015-06-04 23:24 UTC (History)
3 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:


Attachments
Bug 11509: koha-create should print better usage information (5.00 KB, patch)
2014-01-09 14:13 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 11509: koha-create should print better usage information (5.86 KB, patch)
2014-01-09 15:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 11509: koha-create should print better usage information (5.91 KB, patch)
2014-01-12 00:39 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 11509: koha-create should print better usage information (6.06 KB, patch)
2014-01-13 19:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 11509: koha-create should print better usage information (6.06 KB, patch)
2014-01-13 19:59 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 11509: (trivial rmaint followup) wrong parameter count (1.51 KB, patch)
2014-02-10 14:59 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2014-01-09 13:56:03 UTC
The usage information is not helpful as-is. It can be refactored a bit.
Comment 1 Tomás Cohen Arazi 2014-01-09 14:13:58 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2014-01-09 15:50:14 UTC Comment hidden (obsolete)
Comment 3 Chris Cormack 2014-01-12 00:39:19 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2014-01-13 19:58:26 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2014-01-13 19:59:45 UTC
Created attachment 24240 [details] [review]
[PASSED QA] Bug 11509: koha-create should print better usage information

This patch makes koha-create print better and more descriptive usage
information. Also adds the --help and -h switches.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Removed trailing " from:
  $scriptname [db usage mode] [options] instancename"
Comment 6 Galen Charlton 2014-01-13 22:02:19 UTC
Pushed to master.  Thanks, Tomás!
Comment 7 Fridolin Somers 2014-02-08 09:07:50 UTC
Patch pushed to 3.14.x, will be in 3.14.4.
Comment 8 Tomás Cohen Arazi 2014-02-10 14:59:42 UTC
Created attachment 25173 [details] [review]
Bug 11509: (trivial rmaint followup) wrong parameter count

While adding the --help and -h switches I forgot to change to arguments
count validation so that one can actually use those parameters (i.e. koha-create
should accept being invoked with only one parameter).

This patch just changes the minimum parateres required from 2 to 1.

To reproduce:
- Run 'koha-create --help' from master
=> Usage information is printed BUT ALSO an "Error: wrong parameters" message
- Apply the patch and
- Run 'koha-create --help'
=> Usage informatio it printed and no error message.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Comment 9 Galen Charlton 2014-02-10 15:21:14 UTC
I've pushed the follow-up to master.  Thanks, Tomas!
Comment 10 Fridolin Somers 2014-03-07 08:10:15 UTC
"wrong parameter count" patch pushed to 3.14.x, will be in 3.14.5