diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index 040ee25..1d4a61c 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -62,6 +62,7 @@ return [ 'status', 'worklog', 'updated', + 'fixVersions', 'customfield_10010', 'customfield_11226', 'customfield_10840', diff --git a/src/App/Entity/KanbanBoard.php b/src/App/Entity/KanbanBoard.php index e1848fb..15bbf3c 100644 --- a/src/App/Entity/KanbanBoard.php +++ b/src/App/Entity/KanbanBoard.php @@ -235,7 +235,7 @@ class KanbanBoard implements \JsonSerializable private function updatedAtReverseSort(array $toSort): array { $toSort = array_filter($toSort, function(KanbanEntry $item){ - return $item->getAssignee() != null; + return $item->getAssignee() != null && empty($item->getFixVersions()); }); usort($toSort, function(KanbanEntry $a, KanbanEntry $b){ return $b->getUpdatedAt() <=> $a->getUpdatedAt(); diff --git a/src/App/Entity/KanbanEntry.php b/src/App/Entity/KanbanEntry.php index c900d2f..9f156e6 100644 --- a/src/App/Entity/KanbanEntry.php +++ b/src/App/Entity/KanbanEntry.php @@ -52,6 +52,11 @@ class KanbanEntry implements \JsonSerializable */ private $labels; + /** + * @var array + */ + private $fixVersions; + /** * JIRA: customfield_11226 * @var int @@ -315,6 +320,24 @@ class KanbanEntry implements \JsonSerializable return $this; } + /** + * @return array|null + */ + public function getFixVersions(): ?array + { + return $this->fixVersions; + } + + /** + * @param array|null $fixVersions + * @return KanbanEntry + */ + public function setFixVersions(?array $fixVersions): KanbanEntry + { + $this->fixVersions = $fixVersions; + return $this; + } + /** * @return string[]|ArrayCollection */ diff --git a/src/App/Service/JiraCollectorService.php b/src/App/Service/JiraCollectorService.php index af945d5..3f203e1 100644 --- a/src/App/Service/JiraCollectorService.php +++ b/src/App/Service/JiraCollectorService.php @@ -149,7 +149,8 @@ class JiraCollectorService ->setAnswerCode($jsonIssue['fields']['customfield_11692']) ->setIssuePriority($jsonIssue['fields']['priority']['name']) ->setIssuePriorityIcon($jsonIssue['fields']['priority']['iconUrl']) - ->setLabels($jsonIssue['fields']['labels']); + ->setLabels($jsonIssue['fields']['labels']) + ->setFixVersions($jsonIssue['fields']['fixVersions']); $spikeTimeSpent = 0; array_map(function ($worklog) use (&$spikeTimeSpent) {