Plugin Developer Discussion

Discussion for FogBugz Plugin developers

sCustomerEmail sometimes don't bring the correct value

I have a query against Bug table in a Fogbugz plugin and sometimes sCustomerEmail don't bring the correct value from database.


In database I have the value:
and I only get:

Other case:

In database I have the value:
"" <>
and I only get:

How can I solve this problem?

+++ CODE ++++

string feedbackTableName = api.Database.PluginTableName("Feedback");

                    CBugQuery bugQuery = api.Bug.NewBugQuery();
                    bugQuery.IgnorePermissions = true;

                    bugQuery.AddLeftJoin(feedbackTableName, string.Format("Bug.ixBug = {0}.ixBug", feedbackTableName));

                    bugQuery.AddWhere("Bug.fOpen = 0");
                    bugQuery.AddWhere(string.Format("{0}.DataDoFeedback is null", feedbackTableName));
                    bugQuery.AddWhere("Bug.sTicket <> ''");
                    bugQuery.AddWhere("Bug.dtOpened > @dtOpened");
                    bugQuery.AddWhere("Bug.sCustomerEmail <> ''");


                    bugQuery.SetParamDate("dtOpened", new DateTime(2012, 5, 1));

                    CBug[] bugs = bugQuery.List();
                    string emailDoCliente = bugs[0].sCustomerEmail;

++++ END CODE +++++
Douglas Reis Send private email
Tuesday, May 8, 2012

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz