* [bug#53792,done,1h] don't filter 0 when calculate metric.
This commit is contained in:
+1
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user