Unable to create queue trigger this option is currently not available because it is already associated with a process in another folder

How resolve the issue this option is currently not available because it's already associated with a process in another folder?

Error Description: This option is currently not available because it’s already associated with a process in another folder. Please add a new queue with the same properties in this folder.

TT1.jpg


Resolution:
Note: Take the backup of Orchestrator database before executing the below queries.
  1. Execute the select query find out the ID,releaseID from the queuedefinitions table.
select Id, ReleaseId from QueueDefinitions where TenantId = 1 and ReleaseId in (select Id from Releases where TenantId = 1 and IsDeleted = 1)
  1. Run the below query to set ReleaseID=Null for the deleted releases in dbo.QueueDefinitions table.
update QueueDefinitions set ReleaseId = null where TenantId = 1 and ReleaseId in (select Id from Releases where TenantId = 1 and IsDeleted = 1)