with the help of AI, trying to setup an automation that summarizes all the tasks for my team, for the last 7day, including the statut, last comment, etc. grouped by assignee and sends a single email to me with the summary.
in the body of the email, I'm doing this,
**Weekly EE Project Task Updates (Last 7 Days)**
{{#lookupIssues}}
{{#if(assignee)}}
### Assigned To: **{{assignee.displayName}}**
{{#issues}}
- **Issue Key:** [{{key}}]({{url}})
- **Summary:** {{summary}}
- **Status:** {{status.name}}
- **Last Comment:** {{#comments.last}}{{body}}{{/comments.last}}
- **Last Updated:** {{updated.format("yyyy-MM-dd")}}
{{/issues}}
{{/if}}
{{/lookupIssues}}
The audit log shows this error:
I can't figure out what is wrong with this if statetment.
Hi @jorge_rive -- Welcome to the Atlassian Community!
First thing: whichever bot provided that suggestion, it is quite wrong in many, many ways; I respectfully suggest not using it in the future.
In general, and in my opinion, such tools (including the built-in guesser from Atlassian) do not have the context of your Jira install type, site, project, issue type, field values, etc. configuration. And thus they cannot accurately create non-trivial automation guidance.
Back to your question...
Next, you appear to be using Jira Cloud. Is that correct?
If so, the bulk handling feature for Cloud is the Lookup Issues action with the {{lookupIssues}} smart value: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues
The plural {{issues}} smart value is only used with Jira Server and Data Center.
To just report on the issues updated in the last 7 days, simple JQL with the Lookup Issues action would work.
But you note an additional requirement: grouping the results by assignee. That is not possible as JQL is not an SQL (with group-by features) and the no rule actions or list functions to do so either.
There are two possible workarounds, depending upon if you have a known / defined list of possible assignees:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.