Weird bug in GetTicketsBySearch when the date period contains 02/29
Problem reported by Sky Software - March 14, 2016 at 3:20 AM
Submitted
There is a weird bug in the GetTicketsBySearch method in SmarterTrack Web Services:
 
If the date range in searchCriteria contains the day 02/29/2016 and the number of days is less than 24 days, the filter is not applied and the method returns all tickets regardless of their date.
//
// Sample C# code
//
// A list of "key=value" pairs that indicate the search parameters
svcTickets.ArrayOfString searchCriteria = new svcTickets.ArrayOfString();

// First, search by email address. 
searchCriteria.Add("EmailAddress=user@example.com");

// Then, set the start and end dates.
DateTime startDate = new DateTime(2016, 2, 8, 0, 0, 0);
DateTime endDate = new DateTime(2016, 3, 1, 0, 0, 0);

searchCriteria.Add("DateStartUtc=" + startDate.ToString());
searchCriteria.Add("DateEndUtc=" + endDate.ToString());

// Instantiate the SOAP client and fetch the result, then close the client
svcTickets.svcTicketsSoapClient client = new svcTickets.svcTicketsSoapClient(ticketsEndpointConfig);
svcTickets.TicketInfoArrayResult result = client.GetTicketsBySearch("admin@example.com", "******", searchCriteria);

client.Close();
 

Reply to Thread