fix stat clos

This commit is contained in:
afornerot 2024-06-15 13:12:26 +02:00
parent 88ffe47f6e
commit 4c9b0a1db2
1 changed files with 28 additions and 2 deletions

View File

@ -759,6 +759,18 @@ class ScrumController extends AbstractController
];
}
if(!array_key_exists("clos",$tbestim[$idjal]["columns"])) {
$tbestim[$idjal]["columns"]["clos"] = [
"rowcol" => 1000,
"idcol" => "clos",
"gicol" => "clos",
"nmcol" => "Clos",
"color" => "000000",
"nbjrs" => 0,
"nbiss" => 0,
];
}
if(!array_key_exists($idcol,$tbestim[$idjal]["columns"])) {
$tbestim[$idjal]["columns"][$idcol] = [
"rowcol" => $rowcol,
@ -771,6 +783,18 @@ class ScrumController extends AbstractController
];
}
if(!array_key_exists("clos",$tbestim[$idjal]["sprints"][$idspr]["columns"])) {
$tbestim[$idjal]["sprints"][$idspr]["columns"]["clos"] = [
"rowcol" => 10000,
"idcol" => "clos",
"gicol" => "clos",
"nmcol" => "Clos",
"color" => "000000",
"nbjrs" => 0,
"nbiss" => 0,
];
}
if(!array_key_exists($idcol,$tbestim[$idjal]["sprints"][$idspr]["columns"])) {
$tbestim[$idjal]["sprints"][$idspr]["columns"][$idcol] = [
"rowcol" => $rowcol,
@ -784,6 +808,8 @@ class ScrumController extends AbstractController
}
// On cumule les estimations
if($issue->getGiteastate()=="closed") $idcol="clos";
$tbestim[$idjal]["nbjrs"]+=$issue->getWeight();
$tbestim[$idjal]["columns"][$idcol]["nbjrs"]+=$issue->getWeight();
$tbestim[$idjal]["sprints"][$idspr]["nbjrs"]+=$issue->getWeight();