First the use case: I am trying to create an automation that adds a comment after a help desk issue has been waiting on a customer 13 days and then closes it after 14 days if they don't reply.
I have the structure of the rule created and working for the timing. However I am having trouble with the comment to tell a user their issue will be closed in 24 hours. Because most of our users will see the comment in their email and not click through to view the issue's history I want to have the previous comment that is awaiting their reply in the 24 hours notice comment body. I was going to just use the {{issue.comment.last.body}} smart value, but if the last comment was an internal comment that has information the user/customer shouldn't see, that smart value doesn't filter it and will share it with the customer. So I have been perusing the documentation trying to figure out how I might achieve getting the last public comment instead of just the last comment.
Thus far the only thing I can think of is some if else branches that use the {{comment.getfromend(0).internal}} to test each comment with a compare condition. But no issue will have the same amount of comments and I don't see a way to loop through them in a rule for testing, I do see it for displaying all comments. But perhaps I'm just missing the option or a built in property/smart value I can use to achieve this.
Hi JJ,
In order to do this you can utilise another rule to store the last user comment as a property of the issue.
Create a rule like:
The when sending your email you can reference {{issue.properties.lastCustomerComment}}
Hope that helps.
Cheers,
Nick [Automation for Jira]
Co-founder
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the delay in response, it was a busy January. Finally got a minute to try it. It looks like it will work, but since my automation is meant for closing a customer ticket that has been open for 7 days (commenting at 6 days) it's a bit hard to test. So I'm going to mark this as the answer and return if there are problems. I'm betting there won't be problems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So it turns out this isn't working. I figured out I was doing a compare that could never equal so I looked through the documentation and found what looked like a better call under isAfter date functions.
So for example I setup the rule like this (along with a rule for storing the lastPublicCommentDate as the example was given). It keeps saying that a date such as
{"key":"lastPublicCommentDate","value":"2019-05-22T10:44:25.2-0600"}
is not returning true for being after now minus 3 business days (which I believe should be either 5/27 or 5/24 depending on whether or not that function recognizes holidays automatically, I'm guessin it doesn't) And in either case that date is after 5/22.
I also tried messing with the format of the date and using the toDate function to make sure things were actually dates.
I can't seem to get it to ever evaluate to true. What am I doing wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got an answer in a support ticket with code barrel.
Had to add '.toDate' to my lastPublicCommentDate entity property.
Something that helped a lot was adding a log action before my if/else branch like this one
Property as date: {{issue.properties.lastPublicCommentDate.toDate}} Eval: {{now.minusBusinessDays(3).isAfter(issue.properties.lastPublicCommentDate.toDate)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just adding my $0.02 to this using the newer automation UI
(1) Add a custom field to the Jira project e.g. "LastPublicComment".
(2) Create an automation in the project which triggers whenever a public comment is saved, and saves the desired comment details:
(3) To use the field (e.g. in the automation audit log, or in notifications) just call {{issue.properties.LastPublicComment}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm writing a Automation Rule wherein I want to copy the External/Public/Customer comment made by the agent on all the linked cases.
I've tried this {{triggerIssue.comment.last.body}} but it copies the comment as internal note. How can I copy it to the "Reply to Customer" section
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.
Try to switch your condition so you have true or false as your first value to be compared.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The compare condition that checks if the comment is not internal {{comment.internal}} should Equal false is quite useful for us. However I tried to manage that only the last public comment will be sent either via email or web hook but during my tests with email none the following did work. Am I doing something wrong?
{{issue.properties.lastPublicCommentDate.toDate}}
{{comment.properties."sd.public.comment".internal}}
Thanks,
Johannes
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.