我正在阅读 rally-node wiki我不知道如何读取对象。我没有得到的部分是 ref 部分。
如果我只知道故事的标题和格式化 ID (US5),我如何知道用户故事的 ref
?
我知道在创建用户故事后,我有一个包含 .../hierarchicalrequirement/121212121212
的 _ref
,通过使用它我可以读取该对象,但是还有其他方法吗?既然我怎么知道我很久以前创建的用户故事的 _ref
是什么?
或者从 Rally 获取用户故事的最佳方式是使用 restApi.query({})
?
我想要做的是从 Rally 返回特定的用户故事、缺陷等以及特定的获取数据,即格式化 ID、名称等。
谢谢。
最佳答案
您的直觉是正确的 - 如果您只知道您需要的 FormattedID 或名称 query为了它。
restApi.query({
type: 'hierarchicalrequirement', //the type to query
fetch: ['FormattedID', 'Name', 'ScheduleState', 'Children'], //the fields to retrieve
query: queryUtils.where('FormattedID', '=', 'US5'), //formatted id filter
scope: {
workspace: '/workspace/1234' //specify to query entire workspace
}
}).then(); //process results
关于node.js - Rally-Node REST API 返回特定的用户故事或缺陷,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42932831/