Automation for Jira: Ability to get the previous transition date/time

Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 30, 2021

We have a requirement to calculate the duration it took when the ticket was transitioned from the previous transition to a new transition, and create a new ticket in another project that records the duration.  

Example:

Ticket Transitioned to "In Queue" -> April 30, at 10:00 AM 

Ticket Transitioned to "In Progress" -> April 30, at 11:00 AM

Then a new ticket is created where it will say write that the duration is 1hr.  

 

This example shows the previous status id (for use in another Edit action)

{{#changelog.status}}{{from}}{{/}}    

 but, is there a way to get the actual date/time it was transitioned?

 

If this is possible, the duration field in the new ticket would be something like this:

{{now.diff({{#changelog.status}}{{from}}{{/}}.time).hours}}

Thanks,

 

3 answers

3 accepted

0 votes
Answer accepted
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2021

I ended up using new customfields to track the previous transition date and time.  I used automation to log the time when the transition changes.  

0 votes
Answer accepted
Emre Toptancı _OBSS_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 1, 2021

Hello @Fabian Lim ,

For an automated solution that offers great flexibility and details, our team at OBSS built Time in Status app for this exact need. It is available for Jira Server, Cloud, and Data Center.

Time in Status has many report types:

  • Status Duration and Assignee Duration reports allow you to see how much time each issue spent on each status or assigned to each assignee. You can also combine statuses into consolidated columns to see metrics like Ticket Age, Cycle Time, or Lead Time. You can even get SLA-like metrics this way. You can calculate averages and sums of those durations grouped by issue fields you select. (For example see the total InProgress time per Epic, or average Resolution Time per issuetype).
  • Status Count or Transition Count reports show how many times each status or each assignee was used. You can calculate averages and sums of those counts grouped by issue fields you select. (For example, average reopen count per issuetype).
  • 4 types of Date Reports show you the first/last transition dates from/to each status.

tisCloud_StatusDuration_LeadTime_with Estimates.png  tisCloud_StatusDuration_LeadTime_Chart.png  tisCloud_StatusDuration_LeadTime_Average.pngTransitionCount.png  StatusCount.png  tisCloud_FirstTransitionToStatusDate_Report.png

Time in Status can display its reports on its own reporting page, issue view pages and dashboard gadgets (as data or charts in all).

The app calculates its reports using already existing Jira issue histories so when you install the app, you don't need to add anything to your issue workflows and you can get reports on your past issues as well. It works with both Company Managed and Team Managed (next-gen) projects.

Using Time in Status you can:

  • See how much time each issue spent on each status, assignee, user group and also see dates of status transitions.
  • Calculate averages and sums of those durations grouped by issue fields you select. (For example, see average InProgress time per project and per issuetype.)
  • Export your data as XLS, XLSX, or CSV.
  • Access data via REST API. (for integrations)
  • Visualize data with various chart types.
  • See Time in Status reports on Jira Dashboard gadgets and on issue view pages.

https://marketplace.atlassian.com/1211756

EmreT

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 30, 2021

I am curious why you are creating JIRA issues to record the time that an issue is in a particular status.

Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 30, 2021

We are a creating a Time To Acknowledge Report. 

A single ticket can be sent back to "In Queue" status several times in its lifecycle.

The managers want to calculate how much time it spent in the "In Queue" status before it went to "In Progress" individually. 

Example:

Ticket moves to in queue  at 1pm

Then moves to in progress at 2pm

Then it moves back to in queue at 3pm

then it moves back to in progress at 5PM

 

Then 2 new tickets should be created:

Ticket 1-> Duration 1hr

Ticket 2 -> Duration 2hrs

 

I hope this makes sense.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events