0

I am currently working on a C# code to export a Bug Report form HP ALM using OTA.

I am successfully able to fetch the System Fields but am not understanding the way to fetch the User Defined fields.

Below is the code snippet. I have marked the point where I am stuck.

BugFactory bugF;
TDFilter bugFFilter;
List bugL;
bugF = (BugFactory)qctd.BugFactory;
bugFFilter = bugF.Filter;
bugFFilter["BG_STATUS"] = "New Or \"In Dev\" Or \"In Design\"";

bugL = bugFFilter.NewList();

foreach (Bug thisBug in bugL)
{
    myData = myData + String.Format("{0} {1}", thisBug.ID, thisBug.Summary) + Environment.NewLine;

    writer.WriteLine("<tr>");

    string myBugID = String.Format("{0}", thisBug.ID);
    writer.WriteLine("<td >\n" + myBugID.ToString() + " </td>\n"); //This Works

    string myBugV1Def = **// Stuck!! Need help here** <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    writer.WriteLine("<td >\n" + myBugV1Def.ToString() + " </td>\n");

    Writer.WriteLine("</tr>");
}

I've tried adding:

string myBugV1Def = thisBug["BG_USER_TEMPLATE_08"].Value.Name;

and also

string myBugV1Def = thisBug.Field("BG_USER_TEMPLATE_08"); 

but nothing helps.

Thanks.

Koby Douek
  • 16,156
  • 19
  • 74
  • 103
  • Hi...unfortunately I am not able to properly understand your question, but if you want to get a certain parameter, you can before manually get that and check exactly how the name is specified. For instance same variables got different names between GUI interface and OTA. Wish you luck :-) – Marco smdm Apr 03 '17 at 13:12
  • Did you resolved this issue? – Bendram Apr 04 '18 at 21:53
  • Which properties are you trying to access exactly? – Shashwat Swain Apr 19 '21 at 17:31

0 Answers0