How to get the time stamp details when the ticket transitions , using post function.

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

 Unfortunately, Jira does not have a built-in feature to capture the timestamp of the exact moment when an issue was transitioned to a specific status.

Following the steps in this document, you can readily extract the time stamp details when the ticket is moved to a particular status. 

This can also serve as a workaround for the Feature request JRACLOUD-8875 - Transition timestamp

Environment

Jira Service Management Cloud

Diagnosis

In Jira Service Management (JSM) Cloud, we can extract the timestamp of ticket transitions by using the issue history.

 Issue History: An issue's history, available on the issue's page, should provide timestamps for all status changes. You can see this by navigating to the issue and clicking on "History" in the Activity section.

Solution

A workaround is to use a post function in a workflow transition on the specific status to update a custom date/time field with the current timestamp.

Post functions carry out additional processing after a step has been executed.

Steps:

  1. Create a new custom field of type "Date/Time". You could name this field something like "Close Date".
  2. Then, go to the workflow associated with the issue type of your project.
  3. Locate the transition that leads to the specific status. (Closed status, for eg)
  4. Add a post function to this transition. The post function should be of the type "Update Issue Custom Field". Select the "Close Date" field you created earlier, and set it to the value %%CURRENT_DATETIME%%
  5. Publish the changes to the workflow.

Every time an issue is moved to the "Closed" status, the current date and time will be recorded in the "Close Date" field. Remember, changes to workflows can have wide-reaching effects, so make sure you understand the implications before you publish changes!

Finally, please note that these actions require administrative permissions in your Jira instance. If you do not have these permissions, you should contact your Jira administrator for assistance.

Reference: Workflow Post function 

Last modified on Jan 21, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.