获取“InvalidListValue”通过TFS API保存工作项时WIT中所有下拉列表字段的错误 [英] Getting "InvalidListValue" error for all dropdown list fields in the WIT while saving the Work Item though TFS API

查看:83
本文介绍了获取“InvalidListValue”通过TFS API保存工作项时WIT中所有下拉列表字段的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我收到 "InvalidListValue"通过TFS API保存工作项时WIT中所有下拉列表字段的错误。

I am getting "InvalidListValue" error for all dropdown list fields in the WIT while saving the Work Item though TFS API.

我正在尝试使用以下代码保存工作项:

I am trying to save the workitem using the below code :

但是,结果包含8" InvalidListValue"  ; WIT中所有下拉列表文件的验证错误(我的WIT有8个下拉列表字段)。

But, the result contains 8 "InvalidListValue" validation errors for all dropdown fileds in the WIT (my WIT has 8 dropdown list fields).

当我删除"AllowedValues"时来自Temaplate,它工作正常。 

When I remove "AllowedValues" from the Temaplate, it is working fine. 

我验证了,"SuggestedValues"和和"AllowedValues"和"AllowedValues"具有相同的值。请在下面找到详细信息。

I verified, both the "SuggestedValues" and "AllowedValues" has the same values. Please find the details below.

当我尝试访问AllowedValues思想API列表时,它会将计数显示为0. 

When I try to access the list of AllowedValues thought API, it is showing the count as 0. 

                workItem.Fields [" Sample.Control"]。AllowedValues.Count

提前致谢!

推荐答案

您好Rohinvijay,

Hi Rohinvijay,

您能否提供您用于创建或编辑productBackLogItem的代码的更多信息?这里有完整的错误信息? 

Could you please provide more information of your code which you used to create or edit your productBackLogItem? And the whole error message here? 

我试过使用workitem.Save()和workItem.Fields [" Sample.Control"]。AllowedValues.Count,没有任何错误信息。

I tried to use workitem.Save(), and workItem.Fields["Sample.Control"].AllowedValues.Count , nothing error message.

最好的问候


这篇关于获取“InvalidListValue”通过TFS API保存工作项时WIT中所有下拉列表字段的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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