Forums

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

Automation for LAST status change

Matteo Pacenti
Contributor
September 23, 2024

We have an automation in place to check the tickets that changed from STATUS A from STATUS B in the last 24 hours. 

We have a corner case cos a ticket had the same transition 2 weeks ago and yesterday. 

How can we check just the LAST transition from A to B?

1 answer

1 accepted

3 votes
Answer accepted
Walter Buggenhout
Community Champion
September 23, 2024

Hi @Matteo Pacenti,

What are you trying to achieve, what does the automation do and why is the corner case that you describe a corner case?

The following JQL filter should return a list of all issues that transitioned from To Do to In Progress over the last 24 hours:

status CHANGED from "To Do" TO "In Progress" AFTER -24h

That would exclude any issues that went to the same transition 2 weeks ago (simply because it's longer ago). Then it all comes down to what you want to do with the results ...

Hope this helps!

Matteo Pacenti
Contributor
September 25, 2024

Hello @Walter Buggenhout ,

thanks a lot for your quick answer. 

our automation is:

status = "B" and status CHANGED FROM "A" to "B" before -1d

The automation should provide a status change that happened more than 24 hours ago (so I assume BEFORE): we want to be notified when this happens. 

 

Obviously, following your example, if a ticket was moved from "to do" to "in progress" 2 weeks ago and 2 hours ago, we are still notified. We would like to get information about the LAST TRANSITION only.

 

 

Walter Buggenhout
Community Champion
September 25, 2024

Hi @Matteo Pacenti,

If you want to be notified when the transition happens, then you should simply use an issue transitioned trigger for your automation rule, and then send the notification for that specific issue immediately. That would remove your entire complexity.

There is no way to filter for the latest transition, only an alternative to list the issues that went through a specific transition in a specific timeframe. In the example we are discussing, you can specify a start and end to the period you want to set boundaries.

e.g.:

status = B AND status CHANGED FROM A to B
DURING (startOfDay(-1), endOfDay(-1))

... would return a list of all issues that are now in status B and were transitioned from status A yesterday. If you omit the "status = B" part, you would effectively get a list of all issues who went from A to B yesterday, regardless of their current status.

In summary:

  • to get an immediate notification of a transition, send a notification as soon as it happens for that issue. That will send notifications for every single applicable transition (while you might prefer a digest for multiple issues instead)
  • to send a digest with a list of issues, set the start and end date for the list and play around with JQL to cover what you need as closely as possible.
Matteo Pacenti
Contributor
September 26, 2024

Great @Walter Buggenhout the timeframe is exactly what I need! thanks a lot

 

Like Walter Buggenhout likes this

Suggest an answer

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

Atlassian Community Events