Hi Jira Community!
I am trying to use automation to send one email with a list of closed tickets with some details like the key, summary, assignee, and last comment, for each closed ticket.
I found article "Run a rule against issues in bulk" (URL: https://confluence.atlassian.com/automation/run-a-rule-against-issues-in-bulk-993924653.html ) but I think it might be dated because when I ran the automation, it generated an email for each ticket instead of one email with a list of tickets. Below are my setup and log.
The JQL:
(project = FS AND assignee IN (712020:f033c51b-9d71-4374-88f0-d41003981be4, 712020:e19a5a7e-cdc8-4104-b87c-9dd3953df1f9) AND status IN (Cancel, Canceled, Closed, Completed, Declined, Done, "Done -", Failed, Resolved) AND resolved >= -1d)
Please let me know what I am missing.
Thank you! Hoa W
Hello @Hoa Walsh
When you put the JQL in the Scheduled trigger then the actions in the rule will be executed for each issue.
Instead put the JQL in a Lookup Issues action. You can then add the entire result set into one email using syntax like this
{{#lookupIssues}}
names of fields in the issue
{{/}}
Hi @Trudy Claspill !
You've been very patient and helpful in helping me with my ask and I truly appreciate it! I am a beginner to jira automation, and your assistance has been instrumental in my team's success. So again thank you so much!! <3
With that said, I did move the JQL to the lookup issue action and added the lookup fields and I notice the log shows the information but when the email was sent, it doesn't seem to pull the same information.
Hoa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Hoa Walsh
Your syntax is incorrect here:
If you want the header text to appear only once, put it before the {{#lookupIssues}} tag.
Between the {{#lookupIssues}} and {{/}} tags list just the field names and don't use curly braces.
Ticket,Created,Assignee,Requestor,Summary,Last Comment.Resolved
{{#lookupIssues}}
key,created,assignee.displayName,summary,last.comment,resolved
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trudy Claspill ,
I copied your syntax and tried again but the email shows the value as text.
But the log still show the ticket details correctly.
So when using the lookup smart values (ie {{lookupIssues.key}}), this doesn't show values in the email but it does in the log.
When I use your syntax in the log, it doesn't pull back the values in the log either. So I have a feeling the {{lookupIssues.key}} smartvalues is the way to go, at least in the log.
Just for "kicks and giggles", I use the syntax that I had tested out a couple nights ago (I can't find the source to reference here, I will update if I do) and it worked! I'll have to play around with the fields I need but this is getting me to the right track!
Thank you!
Hoa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My apologies! I made a mistake.
Within the email content you do need the curly braces around the field names:
{{key}},{{created}}, etc.
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Aaahhhh! Thank you! Two steps closer to what I"m trying to achieve.
Now to figure out why the comment only display for the last ticket and not each of the ticket, before that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--issue.comments--
Try this instead:
{{comments.last.body}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.