* updated field added to the jira query
* DÖNER is now sorted by modification time in reverse * wip limit and current status in the headers
This commit is contained in:
parent
6ecc186a9f
commit
88527e4ff1
@ -22,6 +22,7 @@ return [
|
||||
'assignee',
|
||||
'status',
|
||||
'worklog',
|
||||
'updated',
|
||||
'customfield_10010',
|
||||
'customfield_11226',
|
||||
'customfield_10840',
|
||||
|
||||
@ -228,6 +228,18 @@ class KanbanBoard implements \JsonSerializable
|
||||
return $toSort;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param KanbanEntry[] $toSort
|
||||
* @return KanbanEntry[]
|
||||
*/
|
||||
private function updatedAtReverseSort(array $toSort): array
|
||||
{
|
||||
usort($toSort, function(KanbanEntry $a, KanbanEntry $b){
|
||||
return $b->getUpdatedAt() <=> $a->getUpdatedAt();
|
||||
});
|
||||
return $toSort;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
@ -237,7 +249,7 @@ class KanbanBoard implements \JsonSerializable
|
||||
'inbox' => $this->prioSort($this->inbox->getValues()),
|
||||
'inProgress' => $this->prioSort($this->inProgress->getValues()),
|
||||
'verification' => $this->prioSort($this->verification->getValues()),
|
||||
'done' => $this->prioSort($this->done->getValues()),
|
||||
'done' => $this->updatedAtReverseSort($this->done->getValues()),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,6 +122,11 @@ class KanbanEntry implements \JsonSerializable
|
||||
*/
|
||||
private $daysBlocked = 0;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $updatedAt;
|
||||
|
||||
/**
|
||||
* KanbanEntry constructor.
|
||||
*/
|
||||
@ -532,6 +537,24 @@ class KanbanEntry implements \JsonSerializable
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdatedAt(): ?\DateTime
|
||||
{
|
||||
return $this->updatedAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \DateTime $updatedAt
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setUpdatedAt(?\DateTime $updatedAt): KanbanEntry
|
||||
{
|
||||
$this->updatedAt = $updatedAt;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
@ -559,6 +582,7 @@ class KanbanEntry implements \JsonSerializable
|
||||
'answerCode' => $this->getAnswerCode(),
|
||||
'worklog' => $this->getWorklog(),
|
||||
'daysBlocked' => $this->getDaysBlocked(),
|
||||
'updatedAt' => $this->getUpdatedAt(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,6 +182,8 @@ class JiraCollectorService
|
||||
unset($jiraIssueType);
|
||||
}
|
||||
|
||||
$kanbanEntry->setUpdatedAt(new \DateTime($jsonIssue['fields']['updated']));
|
||||
|
||||
switch($jiraStatus->getName()) {
|
||||
case "Backlog":
|
||||
$kanbanBoard->addInbox($kanbanEntry);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user