Daily commnets report
Asked by Amr Selem:

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


Answers:
author: Bill Sheboy
body: Hi [@Amr Selem](/t5/user/viewprofilepage/user-id/5145431)

I believe that is possible with a rule, although it would require filtering the comments by each individual team member's user, account id; there is no ability to sort or group-by when parsing comments in an automation rule. Such a rule could use a scheduled trigger, JQL to gather the issues, and smart value, list filtering to parse the comments.

Using automation rules requires learning and experimentation. I recommend you try creating your rule to meet your needs.

If you run into challenges, please post an image of your complete rule, an image of the audit log details showing the rule execution, and explain what is not working as you expect. That will provide context for the community to offer suggestions.

To get you started on creating your rule, please refer to these documentation and example sources:

* <https://www.atlassian.com/software/jira/guides/automation/overview#what-is-automation>
* [https://www.atlassian.com/software/jira/automation-template-library#/rule-list?systemLabelId=all\&page=1\&pageSize=20\&sortKey=name\&sortOrder=ASC](https://www.atlassian.com/software/jira/automation-template-library#/rule-list?systemLabelId=all&page=1&pageSize=20&sortKey=name&sortOrder=ASC)
* <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/>
* <https://support.atlassian.com/jira-software-cloud/docs/use-advanced-search-with-jira-query-language-jql/>
* <https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588>

Kind regards,  
Bill

comments: author: Amr Selem
body: hi i tried this but I get empty mail

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/288928iDC363259ADE37F05/image-size/large?v=v2&px=999 "image.png")


author: Bill Sheboy
body: Please show the audit log details for the rule execution. That may help explain what you are seeing.

What is the JQL you are using for your scheduled trigger? And have you tested the JQL outside of the rule to confirm it works as expected?


author: Amr Selem
body: ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/288933iBCFA6CD7B411C330/image-size/large?v=v2&px=999 "image.png")


author: Bill Sheboy
body: Please select "Show more" to see the details of the rule execution.

Repeating my earlier question: what is the JQL you are using for your scheduled trigger? And have you tested the JQL outside of the rule to confirm it works as expected?


author: Amr Selem
body: ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/288946iC07F1424A313D686/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/288947i66DF1E87BFC6E230/image-size/large?v=v2&px=999 "image.png")

the mail has already sent but it's empty


author: Bill Sheboy
body: Your rule does not have any issues provided and so the email is empty.

To help solve this, what version of Jira are you using: Cloud, Server, or Data Center?

If you are using Jira Cloud or Data Center, you may use the lookup issues action **with a JQL statement to return the issues** . Please look here to learn more about using that action: <https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues>

If you are using Jira Server, it does not have that action. Instead you may use the bulk-handling feature, and **add a JQL statement to your trigger to return the issues** . Please look here to learn more about using that feature of scheduled triggers: <https://confluence.atlassian.com/automation/run-a-rule-against-issues-in-bulk-993924653.html>


author: Amr Selem
body: ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/288948i598C48903E07255A/image-size/large?v=v2&px=999 "image.png")

still empty mail , can you provide me with photo for correct automation


author: Bill Sheboy
body: Please show the details of your scheduled trigger, including the JQL you are using.

In your email body, you are using the lookup issues smart value. But first you must use the lookup issues action or that smart value will not work.

* If you *review the documentation for that action* , it shows how to use the smart value with an iterator: <https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues>
* For your scenario, you would replace {{issue}} with {{lookupIssues}} in the iterator, and nest another iterator inside for the comments, like this:

```
{{#lookupIssues}}
{{#comments}}
Comment by: {{author.displayName}} at {{created}}
{{body}}
{{/}}
{{/}}
```


author: Amr Selem
body: ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/288949i1477F4C7400376A1/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/288950i17DB9183ECB31DFC/image-size/large?v=v2&px=999 "image.png")

i used this automatin but still empty mail


author: Bill Sheboy
body: A scheduled trigger can only use valid JQL, and that is not valid JQL. Let's return to the earlier question, as I am not explaining this well and your rule is not valid.

What is your Jira version: Cloud, Server, or Data Center?

After you have answered that question we can continue. If you do not know the answer, please pause and ask your Jira Site Admin for assistance.


author: Amr Selem
body: I asked my admin and he told me we use cloud


author: Bill Sheboy
body: Thanks for that information.

Here are 3 specific steps for you to try. Please perform them in the order shown.

1. Review the introductory documentation on automation rules. That will help you understand how rules are written and work. <https://www.atlassian.com/software/jira/guides/automation/overview#board-vs-project>
2. Create JQL which returns the issues you want to track. Test that JQL with the View All Issues function to confirm it works. **Please do not proceed to the next step until you have tested the JQL as described.**
3. Modify your automation rule, as described below.

* trigger: scheduled with **no JQL entered**
* action: lookup issues, with the JQL you created and tested above
* advanced compare condition: check if there are any issues before sending the email
  * first value: {{lookupIssues.size\|0}}
  * condition: greater than
  * second value: 0
* action: send email, using the template you have created

If these steps do not help you, I believe you have skipped one or more of the things I have suggested. Please re-read them, and then try again.

If that still does not help, please work with your Jira Site Admin to submit a ticket to Atlassian Support for assistance: <https://support.atlassian.com/contact/#/>