I am using the FogBugz API to integrate with another ticketing system. Following pseudo code outlines the process:
Foreach NewTicket in SystemX
{
ReadTicketFromSystemX
if ticket == new
CreateFogBugzCase
else if ticket == resolved
ResolveFogBugzCase
else
Do nothing
}
So there could be a lot of tickets as this runs once every hour or so. The problem arises when there is a create and the linked resolve in the same batch. The create happens and a new fogbugz case is successfully created. Then it tries to do a search based on the unique ticket criteria (the other ticket has no knowledge of FogBugz of course) to find the case that was just created so that it can update it to resolved.
The search fails. If I wait a couple of minutes and run the resolve through again it successful finds the case and works as expected.
So I assume this has to do with the FullText indexing done in the DB not occurring fast enough so the search fails to find the newly created case. Is there anyway for me to find that ticket without relying on the search index to be updated? Anyway to allow me to just get a ticket where field = something?
The field I am doing a search on is the 'Computer' field. I am using this field to store the other system's unique ticket ID.