REST API and Merged Tickets

I am using the REST API to create tickets but before I make a ticket, I am checking the existing tickets for a match. My match criteria are a specific set of Custom Fields. If I find a match, I do not make a new ticket. If I do not find a match, I make a ticket. All pretty straight forward.

Except … when I search for a ticket that has been merged into another ticket, I get “No results found.” as the result of the REST API search. The result of this query showing no results would be my code would then create the ticket as before, resulting in a duplicate which an analyst has already dealt with.

In further checking, If I search RT for the merged ticket, I get referred to the ticket it was merged INTO and that works fine in the web browser. But, that is not the result in the REST API. I would have expected something to say it was merged into another ticket, or even just bringing me back the ticket itself.

How can I deal with this in the REST API to find a ticket by search criteria when it has been merged?

Thanks in advance.

What is the contents of the response including headers? It would not be unusual for an API to expect you to follow a redirect yourself.

I have the same problem - if I search for the ticket ID which was merged before, the search result is empty, like i search for something which does not exists.

Is there a way using the API or normal RT search rt/Search/Build.html to get the information, in which ticket B my Ticket-ID A was merged into?

best regards

BTW - does somebody know how to create an Scrips condition “On Merge” ?

Hi RT4 developer,

is there notbody here giving me a small idea how to track down this question? Just a small hint?