Skip to content

Commit

Permalink
Fix 'The "incomplete" option does not exist' in the integration:activ…
Browse files Browse the repository at this point in the history
…ities command
  • Loading branch information
pjcdawkins committed May 3, 2022
1 parent 97fcdbd commit 9439e55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ protected function configure()
->addOption('start', null, InputOption::VALUE_REQUIRED, 'Only activities created before this date will be listed')
->addOption('state', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Filter activities by state.' . "\n" . ArrayArgument::SPLIT_HELP)
->addOption('result', null, InputOption::VALUE_REQUIRED, 'Filter activities by result')
->addOption('incomplete', 'i', InputOption::VALUE_NONE, 'Only list incomplete activities')
->setDescription('Get a list of activities for an integration');
$this->setHiddenAliases(['integration:activities']);
Table::configureInput($this->getDefinition());
Expand Down
2 changes: 1 addition & 1 deletion src/Service/ActivityLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function loadFromInput(HasActivitiesInterface $apiResource, InputInterfac
{
if ($state === [] && $input->hasOption('state')) {
$state = ArrayArgument::getOption($input, 'state');
if ($input->getOption('incomplete')) {
if ($input->hasOption('incomplete') && $input->getOption('incomplete')) {
if ($state && $state != [Activity::STATE_IN_PROGRESS, Activity::STATE_PENDING]) {
$this->stdErr->writeln('The <comment>--incomplete</comment> option implies <comment>--state in_progress,pending</comment>');
}
Expand Down

0 comments on commit 9439e55

Please sign in to comment.