diff --git a/src/Command/Integration/Activity/IntegrationActivityListCommand.php b/src/Command/Integration/Activity/IntegrationActivityListCommand.php index f711007d0..c8b3d4976 100644 --- a/src/Command/Integration/Activity/IntegrationActivityListCommand.php +++ b/src/Command/Integration/Activity/IntegrationActivityListCommand.php @@ -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()); diff --git a/src/Service/ActivityLoader.php b/src/Service/ActivityLoader.php index bad1c565c..1625391ea 100644 --- a/src/Service/ActivityLoader.php +++ b/src/Service/ActivityLoader.php @@ -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 --incomplete option implies --state in_progress,pending'); }