如何在 Rally 中获得 "Release" 的 "Name"?

How do I get the "Name" of a "Release" in Rally?

发布是一个对象。如何只获取此对象中的名称。 一般发布看起来像这样:

"Release": {
    "ObjectID": 12345,
    "Name": "2014 Q3",
    "StartDate": "2014-07-01 18:00:00.0",
    "ReleaseDate": "2014-10-01 16:59:59.0"
}

如何只获得 "Name"?

这是我的代码:

_getStoreForopenDefect: function() {
    return {
        find: {
            _TypeHierarchy: { '$in' : [ 'Defect' ] },
            Children: null,
            _ProjectHierarchy: this.getContext().getProject().ObjectID,
            _ValidFrom: {'$gt': Rally.util.DateTime.toIsoString(Rally.util.DateTime.add(new Date(), 'day', -120)) },
            State: "Open",
            Release: "8.0" <<<<<<<<<< Right  is where I want to pass the release
        },
        fetch: ['Severity','Release','Project'],
        hydrate: ['Severity','Release','Project'],
        sort: {
            _ValidFrom: 1
        },
        context: this.getContext().getDataContext(),
        limit: Infinity
    };
}

我想抓取Release,然后传给上面代码中我"Find"下的"Release",这样我的搜索范围就缩小了。

您似乎在使用回溯 api。发布需要在您的查找对象中由其 ObjectID 指定:

Release: 12345

或者,如果您在范围内有多个项目,那么您将需要查询具有相同名称和日期的类似版本,然后指定所有这些版本:

Release: {'$in': [12345, 23456, 34567]}