Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation help - Extending upon Transition for waiting for support/agent rule

Greg LaViolette September 14, 2024

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.

1 answer

0 votes
Anusha A
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2024

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events