Scheduled email notification with automation using jql

Bényei Attila
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 16, 2023

Hello,
I have a question, I could not solve the following problem:
I have a JQL:

issuetype = Epic AND "Test environments information supplier" is not EMPTY AND ("End date of using test environment" is EMPTY OR "End date of using test environment" >= startOfDay(0))

The result of this JQL is more than 100 issues. There are about 10-20 users in the custom field, named "Test environments information supplier". I would like to send every day one email (notification) to each of them only with the issues belong to them. So one of them would get a notification with 3 issues, an other one with 5 and so on...

I have a RULE in Jira automation.
First, there is Scheduler, it runs every day once on that JQL, In the options I clicked on the "process all issues produced by this trigger in bulk". (screenshot below)
Second, I send an email (screenshot below).

My problem is that everybody in the "Test environments information suppliers" get the email listing about all of the issues, not the ones where he / she is the test environments information supplier.

How should I handle it? I guess somehow with branch, but I couldn't find the solution.

We have Jira Data CenterScreenshot_1.pngScreenshot_2.png

Thank you in advance!

 

1 answer

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 16, 2023

I do not think that any of the automation components support the "split the issue list based on a tokenized custom field value" capability you would need for this. Someone will correct if I am wrong, but I think it is more complexity than what the relatively simple rule building blocks support.

If you can't solve it with an automation rule, it should be fairly easy by writing a custom Groovy script and run that with the ScriptRunner app! In Groovy, you can do anything and do that in a concise form.

Bényei Attila
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 17, 2023

Thank you Aron!

As I read, in the cloud version it can be solved with the lookup and using the smart values.  That's why I was looking for in data center version something similiar.

But as I understand in Data center version I can use the scheduler and the action would be the" execute scriptrunner script". In this script I should handle the result of the JQL (customfields, insight customfields) and send an email with this result to the different users... 

It is a little bit more effort than setting the jira automation. :)

I hope there is a solution.
Thank you!

Screenshot_3.png

Suggest an answer

Log in or Sign up to answer