Forums

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

Custom field: Calculating time between creation and issue resolved

Lucas Mucidas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 17, 2022

I have a bug board and i would like to calculate for each issue:

(Resolved issue time) - (created issue time) = XX d YY h ZZ s

I would like to apply this solution retroactively. Can someone guide me through the path to reach this?

 

5 answers

1 accepted

3 votes
Answer accepted
Pramodh M
Community Champion
January 17, 2022

Hi @Lucas Mucidas 

Welcome to the community 🙂

Using automation it's easy to carry out these tasks

Please find the reference here

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time

To get the time difference, here's the steps you need to follow

Create a text field to have difference data 

Create a Automation and have issue transitioned to a status (status when issue is resolved) as the trigger

Edit the issue to include below value

{{issue.created.diff(now).days}}

You could include hours if it's convenient for you

This should have the value of difference of created and resolved date

Thanks,

Pramodh

Pramodh M
Community Champion
January 17, 2022

FYI For reference

Diff A1.png

Like • # people like this
2 votes
Johannes Rudolf
Contributor
July 15, 2022

For the sake of accuracy you could use this snippet in order to report business days only (also for the past):

 

{{issue.created.diff(issue.resolved).businessDays}}
2 votes
Melo
Community Champion
January 17, 2022

Hey Lucas, welcome to the community!

I think you can use automation for Jira in this case.

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Example.2

Cheers,

Melo

2 votes
John Funk
Community Champion
January 17, 2022

Hi Lucas - Welcome to the Atlassian Community!

1. Create a custom number field to hold the value of the difference.

2. Create an Automation for Jira rule based on whatever trigger you want - probably when Issue transitione to Resolved.

3. Add a New action for Edit Issue to the rule to calculate the difference of the fields. Select the new number field. In the open space put this:

{{issue.created.diff(now).days}}

Or you can use minutes if you like. 

0 votes
Lucas Mucidas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 20, 2022

It worked like a charm your solutions

 

Thank you <3

Suggest an answer

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

Atlassian Community Events