I have been trying and searching hard to add a new comment for a defect using C# and OTA API, but not able to achieve anyhow. Bug is having summary, id.. etc properties but no Comment property. I tried like this:
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
}
Please help on how to add a new comment for a bug number.
Thanks in advance !