* taurus prio added
* order by taurus prio
This commit is contained in:
parent
123b90067e
commit
8f005718e0
@ -74,6 +74,7 @@ return [
|
||||
'customfield_10904',
|
||||
'customfield_11692',
|
||||
'customfield_10401',
|
||||
'customfield_12500',
|
||||
],
|
||||
],
|
||||
'url.mhWebPraGoals' => 'https://mhweb.ericsson.se:443/SearchWeb/faces/search/query/resultPage.xhtml?&v=3&queryKey=74023&output=CSV&csvDelimiter=COMMA',
|
||||
|
||||
@ -6,19 +6,19 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
class KanbanBoard implements \JsonSerializable
|
||||
{
|
||||
const PRIO_TRIVIAL = 0;
|
||||
const PRIO_MINOR = 1;
|
||||
const PRIO_MAJOR = 2;
|
||||
const PRIO_CRITICAL = 3;
|
||||
const PRIO_BLOCKER = 4;
|
||||
// const PRIO_TRIVIAL = 0;
|
||||
// const PRIO_MINOR = 1;
|
||||
// const PRIO_MAJOR = 2;
|
||||
// const PRIO_CRITICAL = 3;
|
||||
// const PRIO_BLOCKER = 4;
|
||||
|
||||
private $priorityMap = [
|
||||
'Trivial' => self::PRIO_TRIVIAL,
|
||||
'Minor' => self::PRIO_MINOR,
|
||||
'Major' => self::PRIO_MAJOR,
|
||||
'Critical' => self::PRIO_CRITICAL,
|
||||
'Blocker' => self::PRIO_BLOCKER,
|
||||
];
|
||||
// private $priorityMap = [
|
||||
// 'Trivial' => self::PRIO_TRIVIAL,
|
||||
// 'Minor' => self::PRIO_MINOR,
|
||||
// 'Major' => self::PRIO_MAJOR,
|
||||
// 'Critical' => self::PRIO_CRITICAL,
|
||||
// 'Blocker' => self::PRIO_BLOCKER,
|
||||
// ];
|
||||
|
||||
/**
|
||||
* @var KanbanEntry[]|ArrayCollection
|
||||
@ -222,8 +222,9 @@ class KanbanBoard implements \JsonSerializable
|
||||
*/
|
||||
private function prioSort(array $toSort): array
|
||||
{
|
||||
usort($toSort, function(KanbanEntry $a, KanbanEntry $b){
|
||||
return $this->priorityMap[$b->getIssuePriority()] <=> $this->priorityMap[$a->getIssuePriority()];
|
||||
usort($toSort, function (KanbanEntry $a, KanbanEntry $b) {
|
||||
return $a->getTaurusPrio() <=> $b->getTaurusPrio();
|
||||
// return $this->priorityMap[$b->getIssuePriority()] <=> $this->priorityMap[$a->getIssuePriority()];
|
||||
});
|
||||
return $toSort;
|
||||
}
|
||||
@ -234,10 +235,10 @@ class KanbanBoard implements \JsonSerializable
|
||||
*/
|
||||
private function updatedAtReverseSort(array $toSort): array
|
||||
{
|
||||
$toSort = array_filter($toSort, function(KanbanEntry $item){
|
||||
$toSort = array_filter($toSort, function (KanbanEntry $item) {
|
||||
return $item->getAssignee() != null && empty($item->getFixVersions());
|
||||
});
|
||||
usort($toSort, function(KanbanEntry $a, KanbanEntry $b){
|
||||
usort($toSort, function (KanbanEntry $a, KanbanEntry $b) {
|
||||
return $b->getUpdatedAt() <=> $a->getUpdatedAt();
|
||||
});
|
||||
return $toSort;
|
||||
|
||||
@ -123,6 +123,13 @@ class KanbanEntry implements \JsonSerializable
|
||||
*/
|
||||
private $answerCode;
|
||||
|
||||
/**
|
||||
* ITS OVER 9000!
|
||||
* JIRA: customfield_12500
|
||||
* @var int
|
||||
*/
|
||||
private $taurusPrio = 9001;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
@ -573,6 +580,24 @@ class KanbanEntry implements \JsonSerializable
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getTaurusPrio(): ?int
|
||||
{
|
||||
return $this->taurusPrio;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $taurusPrio
|
||||
* @return KanbanEntry
|
||||
*/
|
||||
public function setTaurusPrio(?int $taurusPrio): KanbanEntry
|
||||
{
|
||||
$this->taurusPrio = $taurusPrio;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
@ -653,6 +678,7 @@ class KanbanEntry implements \JsonSerializable
|
||||
'mhwebExternal' => $this->getMhwebExternal(),
|
||||
'team' => $this->getTeam(),
|
||||
'answerCode' => $this->getAnswerCode(),
|
||||
'taurusPrio' => $this->getTaurusPrio(),
|
||||
'worklog' => $this->getWorklog(),
|
||||
'daysBlocked' => $this->getDaysBlocked(),
|
||||
'updatedAt' => $this->getUpdatedAt(),
|
||||
|
||||
@ -225,6 +225,11 @@ class JiraCollectorService
|
||||
$kanbanEntry->setTeam($jsonIssue['fields']['customfield_10904']['value']);
|
||||
}
|
||||
|
||||
// team : customfield_12500
|
||||
if (isset($jsonIssue['fields']['customfield_12500'])) {
|
||||
$kanbanEntry->setTaurusPrio($jsonIssue['fields']['customfield_12500']);
|
||||
}
|
||||
|
||||
// jira status
|
||||
$jiraStatus = new JiraStatus();
|
||||
$jiraStatus->setName($jsonIssue['fields']['status']['name'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user