I need to find an automatic way (either JQL, script or a database query) to find all issues that the remote issues of them are deleted (manually it looks in the sync panel like “remote issue removed”).
Answer by Francis Martens (Exalate) on 18 August 2020
As a short answer - you can lookup all these issues in the database using following sql query
The exact query depends on the underlying database, this example is for postgres (and jira)
select "ISSUE_URN"
from "AO_08F1AF_REPLICA" re
inner join "AO_08F1AF_TWIN_TRACE" tt on tt."LOCAL_REPLICA_ID" = re."ID"
where tt."STATUS" = 'REMOTE_ISSUE_DELETED';
Note - the layout of the data columns and semantics can differ from version to version of Exalate.
Other approaches (JQL, script and so on) will need product changes