Bug 11509

Summary: koha-create should print better usage information
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: PackagingAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: fridolin.somers, gmcharlt, robin
Version: Main   
Hardware: All   
OS: All   
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
Bug 11509: koha-create should print better usage information
Bug 11509: koha-create should print better usage information
[PASSED QA] Bug 11509: koha-create should print better usage information
[PASSED QA] Bug 11509: koha-create should print better usage information
Bug 11509: (trivial rmaint followup) wrong parameter count

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