* 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:
@@ -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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user