Forums

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

logic for calculation of time spent for a ticket in certain statuses

vcatl2020
Contributor
February 18, 2020

we currently have a custom field "Status transition date" to capture the date for a ticket that does a status transition from one status to another and more specifically for certain statuses of our choice through workflow defined in post functions.

It seems lot confusing looking at other community posts related to calculation of time in status as there are recommendations to use third party addons. While we cannot go that route at the moment for our Jira cloud platform, would it be possible to do some math (may be Status transition date -  now()) using the native functionalities that exists in workflow and spit out the calculated days in another custom field of Integer type or another workaround approach that you can recommend without using any third party addons?

2 answers

0 votes
Mehmet A _Bloompeak_
Atlassian Partner
March 2, 2020

Hi @vcatl2020,

Issue history data is available via Jira Rest API. It provides the exact status transition date and time. It returns json as below, then you can extract and calculate the date differences.
JiraRestAPIOutput.png

 

Or you can use the free add on Status Time Free.

IssueScreenView-3.gif

 

0 votes
Zoryana Bohutska _SaaSJet_
Atlassian Partner
February 25, 2020

Hi @vcatl2020 

When you view the issue view tab at the activity menu in the History section, you can see the approximate time when the status was changed. Using this information you can compare this data to calculate how long the ticket was in each status.

2020-02-25_12-15-26.jpg

But at any time you can try the trial version of an add-on like Time in Status for Jira Cloud and it brings data you need.

Hope it helps

vcatl2020
Contributor
February 25, 2020

Thanks @Zoryana Bohutska _SaaSJet_ for referring to an addon that probably does this job easily.

Yes I do see the approx. time for each status change from the History activities and that we store this value of the status change in a custom date field using post function workflow but not sure of how to proceed for building a logic on calculating this custom date field - now () = no. of days using a post function in the workflow on a status transition or outside of the workflow.

While we have not yet made a decision to go for an add-on just for this specific usage, so waiting to see if an SME can throw some relevant logic with steps that might help to develop this one using out of the box of Jira cloud.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events