The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I want to have each comment made within an Issue to be displayed in an automated email with each comment on it's own line for readability, but don't know what to place to give line breaks.
This is what I have written for automating an email when condition is met:
Project: {{project.name}}
Issue Key: <a href="https://skdyproductexperience.atlassian.net//browse/TE">({{issue.key}})</a>
Status: {{issue.status.name}}
Description Summary:
{{description}}
Comment Body:
{{issue.comments.body}}
where each comment in the issue for test purposes:
1, 22, 333, 4444, 55555, 666666
and it results in:
Project: x-xx
Issue Key: (xx-xx)
Status: To Do
Description Summary:
i wrote this description here
Comment Body:
122333444455555666666
Desired result:
1
22
333 etc.
Hi Zachary,
This is possible to do with some of automation smart values. Specifically see the examples in Jira smart values - lists. Automation will need to treat those comments like they were a list for this to work.
Try changing your Comment Body: line value to be:
Comment Body:
{{#issue.comments}}{{body}}{{^last}},
{{/}}{{/}}
This will add a comma, and then 2 carriage returns after all the comments except for the last comment. Of course, you could remove the comma if you like, but this approach should be able to format that email in the way I think you are looking for here.
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The 2020 acquisition of Mindville added powerful asset and configuration management capabilities to Jira Service Management in the form of Insight. Following the completion of that integration, custo...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.