Skip to content

Instantly share code, notes, and snippets.

@fijiaaron
Created November 20, 2012 22:58
Show Gist options
  • Save fijiaaron/4121849 to your computer and use it in GitHub Desktop.
Save fijiaaron/4121849 to your computer and use it in GitHub Desktop.
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
Copy link

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