我正在尝试使用python2.7和pyral (v1.3.2)更新Rally中的多值下拉列表字段(自定义字段)。
我可以像这样向该字段添加一个值:
>>> update_data = {'FormattedID' : 'US58848', 'c_MapProfile' : {'ObjectID' : 129751972040}}
>>> rally.post('UserStory', update_data)
<pyral.entity.HierarchicalRequirement object at 0x6fffea46c50>这会将该字段更新为由ObjectID指定的属性值。MapProfile字典中的对象ID指向AllowedAttributeValue对象。
但是,我似乎不知道如何将多个值添加到字段中。
有谁能给点提示吗?或者pyral不支持多值字段?
谢谢托马斯
发布于 2017-08-09 01:14:53
我不熟悉pyral工具包,但我可以说api期望数据以某种形式出现。
'c_MapProfile':[
{'_ref':'/allowedattributevalue/123'},
{'_ref':'/allowedattributevalue/124'}]我相信您可以使用getAllowedValues函数检索自定义字段的允许值
请记住,这将覆盖任何现有的值。如果您只希望添加或删除条目而不覆盖当前值-请使用CA Agile Central Web Services API Documentation中解释的集合端点
https://stackoverflow.com/questions/45571645
复制相似问题