From 9d3fa5fa9d00da106ebce9cf1d70bde273dd2b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Danyi?= Date: Tue, 11 Sep 2018 17:57:56 +0200 Subject: [PATCH] * fixed the issue with cli command, so it only updates jira cache, where there is an id --- src/App/Command/UpdatePageCachesCommand.php | 4 ++-- src/App/Service/JiraCollectorService.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App/Command/UpdatePageCachesCommand.php b/src/App/Command/UpdatePageCachesCommand.php index 132cf77..2274daa 100755 --- a/src/App/Command/UpdatePageCachesCommand.php +++ b/src/App/Command/UpdatePageCachesCommand.php @@ -36,8 +36,8 @@ class UpdatePageCachesCommand extends Command $teams = $this->teamService->listTeams(); foreach ($teams as $team) { set_time_limit(30); - if (0 < ($teamId = $team->getId())) { - $this->jiraCollectorService->getKanbanBoard($teamId,true); + if (null !== $team->getFilterId()) { + $this->jiraCollectorService->getKanbanBoard($team->getId(), true); } } } diff --git a/src/App/Service/JiraCollectorService.php b/src/App/Service/JiraCollectorService.php index 2fb37f2..aa4977e 100755 --- a/src/App/Service/JiraCollectorService.php +++ b/src/App/Service/JiraCollectorService.php @@ -69,7 +69,7 @@ class JiraCollectorService * @param bool $forceReload * @return KanbanBoard */ - public function getKanbanBoard(int $teamId = null, bool $forceReload = false): KanbanBoard + public function getKanbanBoard(int $teamId, bool $forceReload = false): KanbanBoard { $team = $this->teamService->getTeam($teamId); $teamName = $team->getName();