Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Send email with issues list using automation?

Dario Alarcón November 2, 2023

Hello community, I have the following problem.
I am creating an automation that allows me to send an email daily with a list of issues based on certain criteria.
The body of the email to be sent must contain the following fields:
- Key
- Summary
- Assignee
- Last comment made
- Date of last comment

So far I've got the first 3 fields working, but I'm needing help identifying the smart values for the "Last comment made" and "Date of last comment" fields.

 

Email Content:

List of issues:
{{#lookupIssues}}
<li><a href="{{toUrl}}">{{key}} - {{summary}}</a> {{assignee.displayName}}</li>
{{/}}

___________________________________________________________________

Below I attach a screenshot of the automation.

 

Captura de pantalla 2023-11-02 163145.png


I hope you can help me solve it, thank you very much!

1 answer

1 accepted

2 votes
Answer accepted
Murat Seven
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 2, 2023

Hi @Dario Alarcón , thanks for your question.

You can send the mail with the following content to include "Last comment made" and "Date of last comment" values.

{{#lookupIssues}}
<li><a href="{{toUrl}}">{{key}} - {{summary}}</a>
{{assignee.displayName}}
{{fields.Last comment made}}
{{fields.Date of last comment}}
</li>
{{/}}

or

{{#lookupIssues}}
<li><a href="{{toUrl}}">{{key}} - {{summary}}</a>
{{assignee.displayName}}
{{fields.customfield_xxxx}}
{{fields.customfield_xxxx}}
</li>
{{/}}

 

If this helps you, you can accept and vote.

Dario Alarcón November 2, 2023

Hi @Murat Seven , thanks for you response.

Because those fields are not custom fields.
What I need to obtain is the last comment that was made on the issue and its respective date.
For example:
If an issue has 5 comments, I only need the content of the last comment and the date that comment was made.
I explain?

Murat Seven
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 2, 2023

Ah, you can format it like this;

{{#lookupIssues}}
<li> <a href="{{toUrl}}" >{{key}}- {{summary}}</a>
{{assignee.displayName}}
{{comments.last.body}}
{{comments.updated}}
</li>
{{/}}

if the issue is not resolved, you can provide feedback.

Like Dario Alarcón likes this
Dario Alarcón November 2, 2023

Excellent, that helped me a lot!
Is there any possibility that it does not take into account the attachments that are included in the comment? That is, it only shows me the text of the comment made.

Because the email received arrives this way and is unfriendly:

print01.png

Dario Alarcón November 2, 2023

@Murat Seven 

Excellent, this helped me a lot!
Is there a possibility that attachments of the "image" type are not taken into account when inserting the comment?


Since the email arrives in the following way and is quite confusing:print01.png

Murat Seven
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 2, 2023

Thank you @Dario Alarcón , I'm glad I could help. You can accept and vote on this request.

and I think it can be done. I'm sending the document. You can review and test it.

for example:

{{#if(not(issue.attachment))}}
{{comments.last.body}}
{{/}}
Dario Alarcón November 3, 2023

 Thanks @Murat Seven , but i dont understand where i must put these code?

This is my code in the email body:

{{#lookupIssues}}
<li><a href="{{toUrl}}">{{key}} - {{summary}}</a> 👉 {{assignee.displayName}}
💬 {{comments.last.body}}
📆 {{comments.updated.convertToTimeZone("America/Argentina/Buenos_Aires").shortDateTime}}
</li>
{{/}}

 

For example, I have an issue that has 5 comments and there is one of those comments that has several images attached, what I need is for those images not to be taken into account when displaying the comment, but only to show me the text of the comment.

Is that code you gave me useful to do that?
Where in the code should I place it?

Dario Alarcón November 6, 2023

@Murat Seven hi, can you see my question ? thks

Murat Seven
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 6, 2023

Hi @Dario Alarcón , I apologize for missing your message.

 

I see there's an FR ticket that is aiming to address the issue that covers a similar angle.

In the meantime, I recommend upvoting the ticket to follow any future development or product updates.

Like Dario Alarcón likes this

Suggest an answer

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

Atlassian Community Events