* [bug#53792,done,1h] don't filter 0 when calculate metric.

This commit is contained in:
zhouxin
2024-08-13 14:59:09 +08:00
committed by 宋辰轩
parent 18f0c5f641
commit 7b98d6e9c4
4 changed files with 4 additions and 8 deletions
@@ -46,8 +46,7 @@ class rate_of_verified_story_in_execution_when_closing extends baseCalc
$verifiedStory = isset($verifiedStories[$execution]) ? $verifiedStories[$execution] : 0;
$validStory = isset($validStories[$execution]) ? $validStories[$execution] : 0;
if($validStory == 0) continue;
$this->result[$execution] = round($verifiedStory / $validStory, 4);
$this->result[$execution] = $validStory == 0 ? 0 : round($verifiedStory / $validStory, 4);
}
}
@@ -45,8 +45,7 @@ class test_concentration_in_execution_when_closing extends baseCalc
$bug = isset($bugs[$execution]) ? $bugs[$execution] : 0;
$story = isset($stories[$execution]) ? $stories[$execution] : 0;
if($story == 0) continue;
$this->result[$execution] = round($bug / $story, 4);
$this->result[$execution] = $story == 0 ? 0 : round($bug / $story, 4);
}
}
@@ -45,8 +45,7 @@ class workload_of_plan_in_execution extends baseCalc
$story = isset($stories[$execution]) ? $stories[$execution] : 0;
$hour = isset($hours[$execution]) ? $hours[$execution] : 0;
if($hour == 0) continue;
$this->result[$execution] = round($story / $hour, 4);
$this->result[$execution] = $hour == 0 ? 0 : round($story / $hour, 4);
}
}
@@ -45,8 +45,7 @@ class rate_of_planned_developed_story_in_execution_when_closing extends baseCalc
$finish = isset($storyFinish[$execution]) ? $storyFinish[$execution] : 0;
$link = isset($storyLink[$execution]) ? $storyLink[$execution] : 0;
if($finish == 0 || $link == 0) continue;
$this->result[$execution] = round($finish / $link, 4);
$this->result[$execution] = $link == 0 ? 0 : round($finish / $link, 4);
}
}