将用户故事作为孩子添加到功能中 [英] add user stories as children to feature

查看:40
本文介绍了将用户故事作为孩子添加到功能中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过更新功能的父字段以指向计划,我能够将功能作为子项添加到计划中 (将功能添加到作为孩子的主动性 (php api))

I was able to add features as children to initiatives by updating the parent field of the feature to point to the initiative (add features to initiative as children (php api))

我认为这与将用户故事作为子项添加到功能中的方式相同 - 通过更新用户故事的字段以指向其功能.

I assumed this would be the same way to do add user stories as children to features -- by updating the field of the user story to point to its feature.

这是给我错误的代码:

<代码>$rally->update("story", $story['ObjectID'], array('Parent' => $feature['ObjectID']));

这是我得到的错误:

<代码>PHP 致命错误:未捕获的异常RallyApiError",消息为无法读取:无法读取引用的对象 13317970914"

它似乎不允许我引用功能 ID..为什么会发生这种情况?

It seems like it's not letting me reference the feature ID..why is this happening?

推荐答案

您可以更新故事的 PortfolioItem 字段.

You may update PortfolioItem field on a story.

WS API doc中,分层需求(又名故事)的父字段是预计是另一个层次要求.它不能是功能.此外,故事上的 Feature 字段是只读的,Feature 上的 UserStories 集合是只读的.这让我们可以选择更新故事中的 PortfolioItem 字段.

In WS API doc Parent field on a Hierarchical Requirement(a.k.a. story) is expected to be another Hierarchical Requirement. It cannot be a Feature. Also, Feature field on a story is read-only, and UserStories collection on Feature is read-only. That leaves us with the option to update PortfolioItem field on a story.

这是一个说明它的 Ruby 代码:

Here is a Ruby code that illustrates it:

@rally = RallyAPI::RallyRestJson.new(config)

obj = {}
obj["Name"] = "new story efd"
new_s = @rally.create("hierarchicalrequirement", obj)

query = RallyAPI::RallyQuery.new()
query.type = "portfolioitem"
query.fetch = "Name,FormattedID"
query.workspace = {"_ref" => "https://rally1.rallydev.com/slm/webservice/v2.0/workspace/11111" } 
query.project = {"_ref" => "https://rally1.rallydev.com/slm/webservice/v2.0/project/2222" }
query.query_string = "(FormattedID = \"F22\")"

result = @rally.find(query)
feature = result.first

field_updates={"PortfolioItem" => feature}
new_s.update(field_updates)

这篇关于将用户故事作为孩子添加到功能中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆