I need to find the email, personId, and ticketId of all tickets closed before a specific date. Is this possible in a singe query?
I have tried the following, but no column data for email.
var ticketsWithOwner = await archiveAgent.GetArchiveListByColumnsAsync("Dynamic", new[] { "ticket.id", "ticket.cust_id","ticket.person.email.email_address" }, null,
new[]
{
new ArchiveRestrictionInfo()
{
Name = "ticket.closed_at",
Operator = "Before",
Values = new[] { "2020-11-05" },
IsActive = true,
InterOperator = InterRestrictionOperator.And,
}
},
new[] { "ticketdisplayclosed" },
0,
10);
Allt Svar (9)
Try 'ticket.cust_id.(email->person_id).email_address' as column for the email address
Hi,
ticket.cust_id will be the person_id, so I believe the fields "ticket.id", "ticket.cust_id" and "ticket.cust_id.emailAddress" will be correct.
Sverre
Hi Marcus,
As far as I know, there isn't any way to get the actual query from this, except as you suggest: having an onsite-VM and see what we finally query to the database. I am also quite certain that this is a functionality that will not be implemented, since the "ideal" of RnD is to keep a certain distance between users/conultants and the database. If you are able to reproduce queries that you believe are incorrect, we will absolutely appreciate the feedback, so that we can fix any such bug.
Sverre