1

如何保存功能项或将其链接到现有风险?我试图发布,但它没有工作:

    var url = "https://rally1.rallydev.com/slm/webservice/v2.x/risk/" + riskRecord.data.ObjectID + "/workitemsaffected";
    return Q.Promise(function (resolve, reject) {
        $.ajax({
            url: url,
            method: 'POST',
            dataType: 'json',
            data:"/portfolioitem/feature/" + portfolioItemObjectID,
            headers: {
                'Content-Type': 'application/json'
            },
            xhrFields: {
                withCredentials: true
            },
            success: function (item) {
                resolve(item.QueryResult.Results);
            },
            error: function (e) {
                console.error(e);
                resolve(false);
            }
        });
    });

谢谢!!

4

1 回答 1

1

实际上,设置 WorkItemsAffected 的 ref 会将 WorkItemsAffected 保存到 Risk。

riskRecord.set('WorkItemsAffected', [{
                _ref: "/portfolioitem/feature/" + valueRecord.data.PortfolioItemObjectID
            }]);

谢谢!

于 2018-06-15T17:07:40.593 回答