Success

User tests: Successful: Unsuccessful:

avatar elkuku
elkuku
21 Jul 2016

This will add validation for arguments passed on the command line.

Validation for command arguments

Assures that there are no duplicates. If a duplicate is found a message similar to the following is generated:

ERROR: The command "Application\Command\Database\Migrate" tried to add option "v" already defined in the application.

The method TrackerCommand::getOption() has been added to validate and fetch command line arguments from the input. Required code changes:

// Before:
$option = $this->getApplication()->input->get('longName', $this->getApplication()->input->get('shortName'));

// After:
$option = $this->getOption('longName');

This will look for both long and short name.

Validation for unsupported arguments passed from user input.

e.g.
$ jtracker --foo
will result in
ERROR: The argument "foo" is not recognized.

Testing instructions

  • Check that all CLI commands execute successfully
  • Check that cron jobs using parameters still run...
  • Short option -v has been removed from commands database migrate and update server.
    Use --version instead.
avatar elkuku elkuku - open - 21 Jul 2016
avatar elkuku elkuku - change - 21 Jul 2016
The description was changed
avatar elkuku elkuku - change - 21 Jul 2016
The description was changed
avatar elkuku elkuku - change - 22 Jul 2016
The description was changed
avatar mbabker mbabker - change - 22 Jul 2016
Status New Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-07-22 18:53:50
Closed_By mbabker
avatar mbabker mbabker - close - 22 Jul 2016
avatar mbabker mbabker - merge - 22 Jul 2016

Add a Comment

Login with GitHub to post a comment