【发布时间】:2014-02-07 10:22:26
【问题描述】:
我一直在努力寻找使用 C# 和 OTA API 为缺陷添加新评论, 但无论如何都无法实现。错误具有摘要、id.. 等属性,但没有 Comment 属性。我试过这样:
private void UpdateComment(string DefectID)
{
string desc = "";
BugFactory bugFac = (BugFactory)pdl_qc.BugFactory;
TDFilter filter = (TDFilter)(bugFac.Filter);
filter["BG_BUG_ID"] = DefectID;
List def = bugFac.NewList(filter.Text);
string bugComment;
foreach (Bug bug in def) // I know this also I need to modify
{
desc = bug.Summary.ToString(); // Here I get the summary for the Defect ID
bugComment = bug["BG_DEV_COMMENTS"]; // but this return some xml format
}
string newComment = "Investigating further" // something like this
//Now I want to update this new comment for DefectID
}
请帮助了解如何为错误编号添加新评论。
提前致谢!
【问题讨论】:
标签: c# ota hp-quality-center