How to retrieve previous value from Jira system field called "updated"?

Saurabh Chaurasia August 1, 2024

I am trying to write an automation to get the difference between time stamp of the current value and time stamp for the previous value in the jira system field "updated". I want to be able to refer the difference value to trigger an action in the automation. Is this possible?

I tried achieving this using smart values 

{{changelog}} & 

{{fieldChange}}

But both don't seem to be working with "updated" field. Any help or direction appreciated.

1 answer

1 accepted

2 votes
Answer accepted
Rebekka Heilmann _viadee_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 1, 2024

Hi @Saurabh Chaurasia and welcome to the Community,

"Updated" is not a field that holds its own value, but will essentially show the timestamp of the last action on the issue that will be reflected in the issue's history.

With the Changelog/Fieldchange you can only access the current change (depending on the Automation trigger) but won't be able to access the change before that - which you'd need to calculate the difference.

I guess the only option is to retrieve the Issue history per Web request: The Jira Cloud platform REST API (atlassian.com) You're interested in the "created" timestamps of each Changelog section.

There are plenty of Community articles on sending Web Requests in Automation rules :) 

Saurabh Chaurasia August 4, 2024

Thanks for the response! Rebekka

I found an easier alternative. I introduced two time stamp fields in the issue & used an automation such that every time there is a change, one date gets passed on from one field to the other one and is replaced by current one (using {{now}} smart value). Then I introduced another automation and just compared the values in these two fields to check the difference and initiate further edit action. 

Hope this helps others as well.

My original problem statement was, I wanted to be able to see when was a particular field updated last on the issue and if it was more than certain amount of time as compared to update time, then I wanted to increment a counter in another numeric field. Essentially I wanted to see how many times a field has been modified over and above a given time frame

Suggest an answer

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

Atlassian Community Events