Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Send custom email using scriptrunner to access Dashboard

Digvijay Singh Gehlot
Contributor
June 20, 2024

Hi Community,

I have created a custom email template in post function Send custom email using scriptrunner.

In Condition section, I want to pass a condition that the custom email should only go to Reporter of the current issue. Need help how to write the correct condition regarding Reporter.

In Email Template, I want to pass a url where user can directly land on Issue Edit screen (/secure/editissue!default.jspa?id=${issue.id} and he can also access his own Dashboard (secure/Dashboard.jspa?selectPageId=XXXXX

I am able to fetch ${issue.id} for Issue Edit screen which automatically reflects the value once the issue is created.

I am facing difficulties to pass dynamic dashboard.jspa?selectPageId= in custom email.

Is there a way I can fetch the correct smart value or Syntex to call dashboard.jspa?selectPageId= in custom email template? 

Or how can I achieve this using jira automation?

Thank you

1 answer

Digvijay Singh Gehlot
Contributor
June 20, 2024

Hi @Nicolas Grossi 

Thank you for your message.

However, I am looking for a groovy script where I can run it in Condition and Configuration section of Send Custom email post function.

My requirement is,

I have created a dedicated dashboard for a specific Reporter using filter as project = PEID And report= "test reporter"

Based on filter, I got a dashboard id and /secure/dashboard.jspa?selectPageId=12345 

I want that first, system should look for reporter "test reporter" on the issue and then it checks for dashboard id or Page id and then it should send the custom email to that Reporter with the dashboard link

May you provide more assistance with respect to above case? It would be a great help.

Thanks

Suggest an answer

Log in or Sign up to answer