This commit is contained in:
tianshujie
2024-03-26 15:34:46 +08:00
parent 33e3dcbccb
commit 48de518767
2 changed files with 10 additions and 9 deletions
+8 -8
View File
@@ -53,22 +53,22 @@ window.setStatistics = function(element, checkedIdList)
let checkedEstimate = 0;
let checkedCase = 0;
let SRTotal = 0;
let total = 0;
checkedIdList.forEach((rowID) => {
const task = element.getRowInfo(rowID);
if(task)
const story = element.getRowInfo(rowID);
if(storyType == 'requirement' && story.data.type == 'story') SRTotal += 1;
if(storyType == story.data.type) total += 1;
if(story)
{
checkedEstimate += parseFloat(task.data.estimate);
checkedEstimate += parseFloat(story.data.estimate);
if(cases[rowID]) checkedCase += 1;
}
})
const rate = Math.round(checkedCase / checkedTotal * 10000) / 100 + '' + '%';
return {
html: checkedSummary.replace('%total%', checkedTotal)
.replace('%estimate%', checkedEstimate)
.replace('%rate%', rate)
};
return {html: checkedSummary.replace('%total%', total).replace('%estimate%', checkedEstimate).replace('%rate%', rate).replace('%SRTotal%', SRTotal)};
}
window.renderStoryCell = function(result, info)
+2 -1
View File
@@ -411,7 +411,8 @@ foreach($stories as $story)
jsVar('cases', $storyCases);
jsVar('summary', $summary);
jsVar('checkedSummary', $lang->product->checkedSRSummary);
jsVar('storyType', $storyType);
jsVar('checkedSummary', $storyType == 'story' ? $lang->product->checkedSRSummary : $lang->product->checkedURSummary);
dtable
(
setClass('shadow rounded'),