制作了我自己的 VSTS 扩展,它返回一个带有使用 wiql 读取的错误列表的网格。
我希望(UI 控件)网格包含错误标题和到错误 url 的超链接,以便可以单击标题跳转到错误。我找不到这样做的任何可能性,但我不相信这是不可能的。
这就是我将源构建到网格的方式:
var sourceArray = workItems.map(function (w) {
return [
w.id,
w.fields["System.Title"],
w.fields["System.State"],
w.fields["GrundfosScrum.gfSeverity"],
w.fields["GrundfosScrum.gfLikelihood"],
w.fields["System.AssignedTo"]];
});
然后:
var options = {
width: "100%",
height: "500px",
source: sourceArray,
columns: [
{ text: "ID", index: 0, width: 100, headerCss: "mystyle" },
{ text: "Title", index: 1, width: 200, headerCss: "mystyle" },
{ text: "State", index: 2, width: 100, headerCss: "mystyle" },
{ text: "Severity", index: 3, width: 200, headerCss: "mystyle" },
{ text: "Likelihood", index: 4, width: 200, headerCss: "mystyle" },
{ text: "Assigned To", index: 5, width: 300, headerCss: "mystyle" },
]
};
我尝试用 替换w.fields["System.Title"]
,w.fields["System.Title"].link(w.url)
结果是表格中的 html 超链接,而不是网格内的超链接。
有任何想法吗?