Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a new bug in Quality Center using the OTA API
using TDAPIOLELib;
namespace oneshore.QCIntegration.Examples
{
public class CreateBug
{
public static void Main()
{
String qcUrl = "http://localhost:8080/qcbin";
String qcDomain = "oneshore";
String qcProject = "QCIntegration";
String qcLoginName = "aaron";
String qcPassword = "secret";
TDConnection connection = new TDConnection();
connection.InitConnectionEx(qcUrl);
connection.ConnectProjectEx(qcDomain, qcProject, qcLoginName, qcPassword);
BugFactory bugFactory = connection.BugFactory;
Bug bug = bugFactory.AddItem(null);
bug.Status = "New";
bug.Project = "QCIntegration";
bug.Summary = "Short description of the bug";
bug.DetectedBy = "Aaron Evans";
bug.AssignedTo = "Nobody";
bug.Priority = "Low";
bug.Post();
}
}
}
@gskiran4u

This comment has been minimized.

Copy link

commented Dec 12, 2014

Hi, in my case, Detected ON date ois mandatory.. How to add the that.

If i want to add other mandatory fields, how to get the fields name e:g: MyBug.DetectedBy

MyBug.DetectedonDate is not working?

Please help me here

Regards,
Kiran

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.