Hi there,
I've been trying to get a series of automation to work but have not succeeded. I had this working in Jira at a previous job, and it was perfect. Unfortunately, I set that up several years ago, didn't document how I did it, and I have been unable to recreate it. :-(
Here's how I need it to work:
Here's the current configuration. There are three automations, each scheduled to run every hour. Here are the queries for each one:
The 3-day notification works. The 5-day also works, but not until 5 days after the 3-day notification when I need it to be 2 days after the automated notification (the original 3 + 2 more days). The same is happening for the 7-day, of course.
So how do I get the 5 and 7-day automations to count based on the last customer comment instead of the previous automated comment?
Any help is appreciated!
Hi @wrabbit - You'll need an advanced condition in your automation rule also using Updated can be a little messy. Lastly, you can accomplish this with one rule. I would attack it like this:
status = "Waiting for Customer" AND status changed BEFORE startOfDay(-3) AND status changed AFTER startOfDay(-5)
{{comment.comment.last.author}}
Does Not Equal
{{issue.reporter}}
status = "Waiting for Customer" AND status changed BEFORE startOfDay(-5) AND status changed AFTER startOfDay(-7)
{{comment.comment.last.author}}
Does Not Equal
{{issue.reporter}}
status = "Waiting for Customer" AND status changed BEFORE startOfDay(-7)
{{comment.comment.last.author}}
Does Not Equal
{{issue.reporter}}
Give this a try and let me know if it works for you.
Hey there! Thanks so much for the detailed reply. I tried implementing a version of this yesterday (screenshot attached) and scheduled it to run this morning. It posted the comments it should have. However, it "reset the timer," and the queries are validating against zero issues now. I think this is because the automation's comment on the issue is counted as the last comment.
So, it seems there needs to be some way to exclude the automated comments so that the queries are only based on the last customer comment. Is that something we can accomplish through the JQL?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is why I recommended tweaking the query and adding the advanced conditions. Updated is too generalized and can cause challenges like this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I understand your condition correctly, it was saying the last comment shouldn't be by the reporter. Is there a way to make it so that the last comment isn't by the Jira automation? That's the piece I can't figure out.
The status change you had recommended didn't work for me, by the way. That's why I went back to "updated" because it did work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you're saying that even if the last comment was by the assignee, you'd want this rule to trigger?
If so, you'll need to get the ID of the Jira Automation. The best way I can think of that is by creating a quick test automation like this:
This should get you the ID for the author and then you can update your advanced condition like this:
{{comment.comment.last.author}}
Does Not Equal
ID Retrieved from above
Are you getting an error with the query I provided or just not getting the right results?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In terms of this automation, the last comment would always be by the assignee. That's the whole point. The assignee has asked the reporter/customer a question (more info, confirmation if the issue is resolved, etc.), but the customer hasn't replied. So this automation kicks in after 3 days of no response asking for an update to help prevent requests from stalling and staying unresolved. If the reporter still hasn't responded after 5 days total, send another reminder. And after 7 days total if there is still no response, close it out.
But if the customer does respond at any point during those 7 days, the status will change (it will no longer be in "waiting for customer"). When the assignee replies again, it would go back into "waiting for customer."
I hope that helps! I apologize if I did not explain this clearly before.
As for your query, it did not give the intended results. i.e., it was returning issues that had been updated within the last three days. The only way I could figure out how to get the intended results was with the queries in my screenshot (inspired by your suggestion). Now I just need to figure out how to get the automation to ignore it's own automated comments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is shocking that Jira doesnt have this feature by default, Zendesk makes this EXTREMELY easy. Either way, I found a relatively simple single-rule solution.
The idea being that if a ticket is waiting for customer for 5 days we comment on it, and 2 more days later we close it.
JQL: status = "Waiting for Customer"
# DO NOT only include issues that changed since the last time this ran
updated < -2d
{{issue.comments.getFromEnd(0).body}} contains "this issue has been marked as stale"
{{issue.comments.last.author.displayName}} equals Automation for Jira
updated < -5d
This seems to be working for us. The basic logic flow is:
Its a relatively simple approach to the issue, and should work for as many warnings as you want, as long as you change the comment body of the warning, you can compare to just the comment you want with either {{issue.comments.getFromEnd(0)}} or {{issue.comments.last}}
Hope this helps someone!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can check when the last comment was added too along with the comment author by using this smart value {{now.diff(issue.comments.last.created).abs.businessDays}} this will give you the difference value from today in number which you can compare with value like 5, 7
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.