I'm trying to create global automation rule and in this rule I will need to use the assignee email to send notification: {{issue.assignee.emailAddress}}. but in case the assignee is empty I want the automation rule to use the reporter email instead of the assignee: {{issue.reporter.emailAddress}}. The assignee and reporter could be different people and the notification should be sent to only one person starting with the assignee if the field is filled otherwise use reporter.
How can I achieve this? I tried the if/else block for when the assignee is empty but didn't know how to continue with the rule. any ideas?
As well I have general but very important question: since I'm creating a global rule I will need a unique identifier across all issues/tickets within jira (a unique id for issues across all projects). I need it in number format since I will be using it in the header of the 'send web request', so is the solution here to use {{issue.id}} ?