I've got an Automation rule set up to send an email to the issue assignee upon a transition. On the transition screen, there's the comment field so the user has the option to add a comment.
Part of the custom message in the email is as follows:
See below for the comment added:
<hr>Comment Author: <b>{{initiator.displayName}}</b>
Comment: <b>{{issue.comments.last.body}}</b><hr>
Which looks like this in the email:
However, because the comment on transition isn't mandatory, if no comment is added, the email will still display the LAST comment to be made on the issue (because of the {{issue.comments.last.body}} part).
Does anyone know of the smart value to ONLY pull the comment into the email IF it's added on the transition? (Basically, if no comment is added on the transition, I'd like this to be blank in the email)
Solved! FYI for anyone looking for a solution, I've set up the following rule. It's slightly complicated but works well.
On the transition, it checks the time difference between now and the time the last comment was posted (in this case, it checks if the last comment was posted within the last 10 seconds).
If it has, then it will send the first email template, containing the last comment smart value. If not, it will send the second email template which doesn't have a comment-related smart value.
Hi Callum - This is an Excellent example of what you can do with Automation! Well Done!
@John McKiernan1 FYI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a great way to use automation - Kudos!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Callum Carlile _Automation Consultants_I don't know how I've would have solved my problem without your answer!
I'm experimenting trying to create a new issue by transitioning an existing one but wanted to have the comment from the transition screen "moved over" to the newly created issue, instead of keeping it in the transitioned issue. So, your sample was key for me.
Thank you! 👍🏻
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.