How to add all issue comments to an email through automation ?

serge calderara
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2022

Dear all,

We have a need to send by email all issue comments list in the email body.

how to do that from automation rule ?

regards

2 answers

5 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 8, 2022

Hi @serge calderara ,

you can use the smart value {{issue.comments}} to pull all comments or {{issue.comments.last}} to pull the most recent comment. You simply add that to the body of the email. With that said when do you want to trigger this and are there any conditions?

serge calderara
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 9, 2022

@Jack Brickey , that works thanks

but is there a way to get only All comments from "Reply to customer" tab ?

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 9, 2022

Hi @serge calderara , so is this Jira or Jira Service Management? I am unaware of internal/public comment properties in Jira. Regardless, there is a reference to internal comment properties in the documentation but I have not attempted pulling the value/data of only public comments. I have used in conditions.

Amr Selem October 26, 2023

can I see the full code? 

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 26, 2023

@Amr Selem , I don't understand your request. What code?

Amr Selem October 26, 2023

Hi sorry for misunderstanding, I want to send Daily mail by all comments added in this day  please provide full screen for the automation 

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 27, 2023

Here is an example below. If you want a daily email then change the trigger to "scheduled" and set to run at the desired time. Please not the example will show all historical comments not just any added that day. There is not a way to limit the display to "daily" comments AFAIK.

IMG_2901.jpeg

Amr Selem October 27, 2023

image.pngimage.png

SORRY but i get empty mail 

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 27, 2023

Remove the space between the period and "Comments". It should be {{issue.comments}}

Amr Selem October 27, 2023

image.png

still the same empt mail 

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 27, 2023

Ok so you are not referencing any issues in this automation. For this to work, you must reference one or more issues. So which issue do you want to send an email for? Do you want to send out an email for a single issue or many issues? 

Amr Selem October 27, 2023

i want last comment for all issues 

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 27, 2023

All issue in all projects? This seems to be a bad idea. You could end up with thousands of emails. Maybe you only want an email on issues that have been updated that day in a specific project. If that is what you want then you need something like below ...

  • after your trigger, you need to add an Action to lookupissues that you want to action on. Action lookupIssues using JQL - project = abc and updated >= startofday()
  • then after the action add a Branch to iterate thru the results from the lookupissues- For each smartvalue {{IookupIssue}}
  • finally from within that branch place your email action.

Keep in mind that you are going to get an email for each issue returned in the lookupissues branch. 

if you want something different, please detail precisely. What issues do you want to receive an email for. It is difficult for me to assist without truly understanding your goal. Finally, I highly recommend looking at the documentation on automation and searching within the community. Good examples of what others have done.

Amr Selem October 27, 2023

I work on project management templet as all our projects are epic in one project my team add daily comments for their task, I want to send a daily email to the supervisor containing each comment added on this day 
the email should contain
- team member name
- issue summary
- comments

0 votes
Amr Selem October 27, 2023

still the same empt mail image.png

Lyle de Groot February 12, 2024

You need to insert the JQl query in the rule to include the project name, otherwise the email will be blank @Amr Selem 

I don't think Jira is capable of summarising all comments into one summary. The tests I have done results in what @Jack Brickey said, in that for every issue found an email will be sent. Annoyingly this is not what I need...

I wish Atlassian could just sort out these basic functions for automations...

 

jql rule.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events