I wanted to create an automation rule through which I add customer email id from description to reporter field in same ticket.
Right now I have below rules. Adding customer email to customers list working fine.
But retrieving this email from list of customers and adding to same ticket as Reporter is not working.
Error as
It worked for me by creating two rules as below:
Adding Customer to SD list:
=============================
When issue created
Then: Add new customer
Email - {{issue.description.match("([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)")}}
Customer Email as Reporter:
==============================
When issue scheduled
JQL - project = <KEY> AND reporter = 63060a487cedcad7664d9f9e AND status != Done
Uncheck - Only include issues that have changed since the last time this rule was executed (Better to keep this unchecked)
Then: Edit issue fields
Choose fields to set - reporter
Additional fields:
{
"fields": {
"reporter": {
"id": "{{issue.description.match("([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)")}}"
}
}
}