sprint 视图中的简单燃尽图链接在昨天的一天中被删除。这里有问题报告:
https://developercommunity.visualstudio.com/content/problem/666651/sprint-burn-down-charts-arent-appearing.html
该链接中有一些讨论,产品组正在考虑暂时恢复它,直到分析燃尽图问题得到解决。
原始图表仍可通过 API 调用获得。我为 chrome 编写了一个简单的用户脚本来恢复原始功能。我编写的版本是针对单个项目的,因为这是我的需要,但如有必要,无需太多努力即可扩展。
manifest.json:
{
"name": "Burndown Chart Extension",
"manifest_version": 2,
"version": "1.0",
"content_scripts": [
{
"matches": [ "https://dev.azure.com/[collection]/[projectName]/_sprints/taskboard/*" ],
"js": [ "burndown.user.js" ],
"run_at": "document_idle"
}]
}
burndown.user.js:
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
script.addEventListener('load', function () {
var script = document.createElement('script');
script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
}
function main() {
var jsInitTimer = setInterval(function () {
if (jQ('.vss-HubTileRegion span').length) {
clearInterval(jsInitTimer);
var img = document.createElement('img');
img.setAttribute('src', 'https://dev.azure.com/[collection]/[projectId]/[teamId]/_apis/work/iterations/[iterationId]/chartimages/burndown?width=120&height=38&counter=18')
var anc = document.createElement('a');
anc.setAttribute('href', 'https://dev.azure.com/[collection]/[projectId]/[teamId]/_apis/work/iterations/[iterationId]/chartimages/burndown?width=1400&height=1000&showDetails=true&counter=18')
anc.append(img);
jQ('.vss-HubTileRegion span').append(anc);
}
}, 500);
}
addJQuery(main);