* fixVersions added, to filter items in DÖNER

This commit is contained in:
Dávid Danyi 2017-09-13 16:35:21 +02:00
parent dfcd3b086e
commit 0e81a9d60b
4 changed files with 27 additions and 2 deletions

View File

@ -62,6 +62,7 @@ return [
'status',
'worklog',
'updated',
'fixVersions',
'customfield_10010',
'customfield_11226',
'customfield_10840',

View File

@ -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();

View File

@ -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
*/

View File

@ -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) {