2
我試圖找出一種方法來拉鍊接到用戶故事可能有的附件,但我還沒有能夠找出如何。就我所知,當用戶故事具有附件時,我在該列中唯一得到的是「[object Object]」。鏈接到附件
似乎沒有太多的抓取附件,如果任何人可以擺脫任何光線或指向正確的方向,我一定會很感激!
<html>
<head>
<title>Table</title>
<meta name="Name" content="App Example: Table" />
<meta name="Version" content="2010.4" />
<meta name="Vendor" content="Rally Software" />
<script type="text/javascript" src="https://rally1.rallydev.com/apps/1.24/sdk.js?loginKey=bignumber"></script>
<script type="text/javascript">
function tableExample() {
var rallyDataSource = new rally.sdk.data.RallyDataSource('12345', '12345', 'True', 'True');
function itemQuery() {
var queryObject = {
key: 'stories',
type: 'HierarchicalRequirement',
fetch: 'FormattedID,Name,ScheduleState,Description,Attachments',
query: '(Name contains "release")'
};
rallyDataSource.findAll(queryObject, populateTable);
}
function populateTable(results) {
var tableDiv = document.getElementById('aDiv');
var config = { columns:
[{key: 'FormattedID', header: 'Formatted ID', width: 100},
{key: 'Name', width: 400},
{key: 'ScheduleState', header: 'Schedule State', width: 200},
{key: 'Description', width: 800},
{key: 'Attachments', header: 'Attachment Link', width: 200}]};
var table = new rally.sdk.ui.Table(config);
table.addRows(results.stories);
table.display(tableDiv);
};
itemQuery();
}
rally.addOnLoad(tableExample);
</script>
</head>
<body>
<div id="aDiv"></div>
</body>
</html>
你太棒了!這沒關係,謝謝。 –
我應該指出,這種方法:rally.sdk.util.Context.getServerInfo()。getSlmUrl()是一種更加優雅和支持的方式來獲取拉力賽服務器本身的URL,而不像硬編碼那樣我發佈的示例... – 2012-05-01 18:24:11