Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation Rules to chase JSM Tickets

PhilSpo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2021

Hello,

Can anyone give me any pointers on how to create rules that chase tickets?

 

So I have setup a rule to run each evening at 9pm. Its looking for tickets that have sat in a particular status for over 1 week. It will then update the ticket with a comment.

The conditions it is looking for are as follows:

(Issue Fields Condition) Status = 'Fix in Test'

(JQL Condition) status changed TO "Fix in Test" before startOfDay(-7)

 

When I try and SAVE it, it errors with:

 

Error

  • The rule has been configured with components that require issues to be provided by the trigger. You need to use the option to run JQL to provide issues. The following components require issues: JQL condition, Issue condition, Comment on issue

 

 

So I have to remove the (JQL Condition) and add that part into:

'Run a JQL search and execute actions for each issue in the query.' in the 'Scheduled Tab'

 

I have ticked the 'Only include issues that have changed since the last time this rule executed' box,

 

The automation now runs fine and does what i need it to. However the next day at 9pn it updates the same tickets with the same update again (even though they havent changed)

So it seems that running the schedule with JQL (that its forcing me to do) just updates everything it finds whether the rule ran on it last time or not. This warning looks to confirm that:

 

'Your automation rule will perform actions on all issues returned in the above query, which can't be undone. Before saving this rule, look through it carefully to make sure this is okay.'

 

Can anyone think of any other ways to do this?

Im currently running all this in a sandbox, so nothing is actually updating LIVE tickets.

 

Cheers


Phil

1 answer

1 accepted

8 votes
Answer accepted
Alexis Robert
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 25, 2021

Hi @PhilSpo ,

 

the rule keeps running against the same tickets because you added a new comment the day before, so Automation considers that it was updated since it last run.

You could add a condition to target only tickets that have been in this status for exactly 7 days (this way after you add a comment on day 7 it will not consider the ticket again).

You could also add a condition on the last comment to check if it matches the one you add with your rule.

 

Let me know if this helps, 

 

--Alexis

PhilSpo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2021

Hey @Alexis Robert 

 

Cheers for the response. Yes it makes sense now. 

 

I have amended my JQL to use 'status changed TO "Fix in Test" DURING (startOfDay(-7),endOfDay(-7))'

 

So this correctly brings back all issues that transitioned into 'Fix in Test' 7 days ago.

 

However it has brought in a ticket that was transitioned to that status 7 days ago, but has since left that status, only to go back into that status today!

 

What i need for this JQL to work, is to be able to only bring back issues that had 'Fix in Test' as their LAST transition 7 days ago. If it has been transitioned in the meantime then to ignore it.

 

Cheers

 

Phil

Alexis Robert
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 25, 2021

Then you can add to your JQL :

AND status = "Fix in Test"

 

That should be enough to only get tickets that are still in this status.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events