Basically I want to extend upon this:
https://community.atlassian.com/t5/Jira-Service-Management/Automation-Rule-transition-waiting-for-support-to-waiting-for/qaq-p/2072503
However.. I only want it to fire if the last comment is older than x minutes (I'm thinking 10 minutes) to prevent excessive transitions in the issue during quick back and forth conversations.
The furthest I've come is to be able to get a list of the comments created and their age and used a diff to get the results in minutes.
{{comment.created.diff(now).minutes}}
Which will return something like "667, 636, 628, 60, 53, 13"
I want to capture the last value, "13", and create a rule around that to fire when it's greater 10 minutes.
I've tried using substringAfterLast into this:
{{comment.created.diff(now).minutes.substringAfterLast(", ")}} >= 10
I'm testing it with a Log Action, but all I get is the ">= 10".
Hopefully I'm doing something horribly embarrassingly wrong, or maybe it just can't be done.
Thanks all!
EDIT: After some thought I realized the above doesn't get me what I want, I'm going to have to regroup. If anyone has some thoughts, I'd like to hear about them.
Hi Greg,
Thanks for your question on community.
After testing this on my instance and applying the same logic, it looks like you're on the right track. However, I recommend a small adjustment: use variables to store the values. This can help with comparing values in the IF condition.
Example -
- Create Variable: Test,
Smart Value: {{Test.substringAfterLast(", ")}}
If you have further questions please let me know, I shall try to export the json and send it here after I filter out the sensitive information.
Regards,
Anusha A
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.