* Fix bug #42470.
This commit is contained in:
@@ -72,14 +72,14 @@ $fnGenerateProgramRowData = function($programID, $program) use ($config, $users)
|
||||
$item->createdBy = '';
|
||||
$item->totalUnclosedStories = $totalStories - $program['closedStories'];
|
||||
$item->totalStories = $totalStories;
|
||||
$item->closedStoryRate = ($totalStories == 0 ? 0 : round($program['closedStories'] / $totalStories, 3) * 100);
|
||||
$item->closedStoryRate = empty($item->totalUnclosedStories + $program['finishedStories']) ? 0 : round($program['finishedStories'] / ($item->totalUnclosedStories + $program['finishedStories']), 3) * 100;
|
||||
$item->totalPlans = $program['plans'];
|
||||
$item->totalProjects = 0;
|
||||
$item->totalExecutions = 0;
|
||||
$item->testCaseCoverage = $program['coverage'] ?? 0;
|
||||
$item->totalActivatedBugs = 0;
|
||||
$item->totalBugs = 0;
|
||||
$item->fixedRate = $item->totalBugs == 0 ? 0 : round($program['fixedBugs'] / $item->totalBugs, 3) * 100;
|
||||
$item->fixedRate = empty($program['unresolvedBugs'] + $program['fixedBugs']) ? 0 : round($program['fixedBugs'] / ($program['unresolvedBugs'] + $program['fixedBugs']), 3) * 100;
|
||||
$item->totalReleases = $program['releases'];
|
||||
$item->latestReleaseDate = '';
|
||||
$item->latestRelease = '';
|
||||
@@ -105,15 +105,17 @@ $fnGenerateLineRowData = function($programID, $lineID, $line) use ($config, &$li
|
||||
$item->createdDate = '';
|
||||
$item->createdBy = '';
|
||||
$item->totalUnclosedStories = zget($line, 'totalStories', 0) - zget($line, 'closedStories', 0);
|
||||
$item->finishClosedStories = zget($line, 'finishClosedStories', 0);
|
||||
$item->totalStories = zget($line, 'totalStories', 0);
|
||||
$item->closedStoryRate = (empty($line['totalStories']) ? 0 : round(zget($line, 'finishClosedStories', 0) / zget($line, 'totalStories', 0), 3) * 100);
|
||||
$item->closedStoryRate = empty($item->totalUnclosedStories + $item->finishClosedStories) ? 0 : round($item->finishClosedStories / ($item->totalUnclosedStories + $item->finishClosedStories), 3) * 100;
|
||||
$item->totalPlans = zget($line, 'plans', 0);
|
||||
$item->totalProjects = 0;
|
||||
$item->totalExecutions = 0;
|
||||
$item->testCaseCoverage = zget($line, 'coverage', 0);
|
||||
$item->totalActivatedBugs = 0;
|
||||
$item->totalActivatedBugs = zget($line, 'unresolvedBugs', 0);
|
||||
$item->totalFixedBugs = zget($line, 'fixedBugs', 0);
|
||||
$item->totalBugs = 0;
|
||||
$item->fixedRate = !empty($item->totalBugs) ? round(zget($line, 'fixedBugs', 0) / $item->totalBugs, 3) * 100 : 0;
|
||||
$item->fixedRate = empty($item->totalFixedBugs + $item->totalActivatedBugs) ? 0 : round($item->totalFixedBugs / ($item->totalActivatedBugs + $item->totalFixedBugs), 3) * 100;
|
||||
$item->totalReleases = zget($line, 'releases', 0);
|
||||
$item->latestReleaseDate = '';
|
||||
$item->latestRelease = '';
|
||||
@@ -134,14 +136,14 @@ $fnGenerateProductRowData = function($lineID, $product) use ($users)
|
||||
$item->createdBy = $product->createdBy;
|
||||
$item->totalUnclosedStories = $product->totalStories - $product->closedStories;
|
||||
$item->totalStories = $product->totalStories;
|
||||
$item->closedStoryRate = empty($product->totalStories) ? 0 : round($product->closedStories / $product->totalStories, 3) * 100;
|
||||
$item->closedStoryRate = empty($item->totalUnclosedStories + $product->finishedStories) ? 0 : round($product->finishedStories / ($item->totalUnclosedStories + $product->finishedStories), 3) * 100;
|
||||
$item->totalPlans = $product->plans;
|
||||
$item->totalProjects = $product->projects;
|
||||
$item->totalExecutions = $product->executions;
|
||||
$item->testCaseCoverage = $product->coverage;
|
||||
$item->totalActivatedBugs = $product->unresolvedBugs;
|
||||
$item->totalBugs = $product->totalBugs;
|
||||
$item->fixedRate = empty($item->totalBugs) ? 0 : round($product->fixedBugs / $item->totalBugs, 3) * 100;
|
||||
$item->fixedRate = empty($item->totalActivatedBugs + $product->fixedBugs) ? 0 : round($product->fixedBugs / ($item->totalActivatedBugs + $product->fixedBugs), 3) * 100;
|
||||
$item->totalReleases = $product->releases;
|
||||
$item->latestReleaseDate = $product->latestReleaseDate;
|
||||
$item->latestRelease = $product->latestRelease;
|
||||
|
||||
Reference in New Issue
Block a user