【问题标题】:Add new Comment for a defect in Quality Center 11 using C# (OTA API)使用 C# (OTA API) 为 Quality Center 11 中的缺陷添加新评论
【发布时间】: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


    【解决方案1】:

    QC 中的注释字段是实际值以 html 格式/html 文档存储的字段。

    要添加注释,您需要在关闭 html 文档的标记之前插入下一个文本。

    您应该使用标准 html 来格式化您的评论。

    【讨论】:

    • 谢谢@Alex Shnayder。这意味着我需要处理包含完整 html 标签的变量,并将我的 cmets 与所有其他标签(格式化程序)一起添加。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-13
    • 1970-01-01
    相关资源
    最近更新 更多