How to get difference of two custom fields in JIRA

I have created two custom fields, both are containing date. How can I get the difference of both the fields in a single field.

5 answers

1 accepted

0 votes
Accepted answer

I wanted to do this and found a solution that worked for me - see https://answers.atlassian.com/questions/101411/calculate-days-between-dates

Hi Daflint, the plugin will definitely help, but when I am using getTimeSpent(key, currentUser()) it shows 0 for every issue.

Have you record time spent against the issues in question?

I din't get, "Have you record time spent against the issues in question?". Do you mean to say I should specify let's say spent = "4d"

I believe that does need to be completed as part of the issue for that field to return a value

Just going to comment instead of answer, as I'm not sure if this will work - maybe the "Calculated Number Field" from JIRA Misc Custom Fields plugin? I am horrible at math so I have no idea if you are able to create a formula that would work with dates instead of raw numbers.

Thanks Nat, but I think it would be a nice idea if I can trank the transition and get the desired result. Well this is an awesome suggetion you have given with an awesome plugin, but it won't serve the purpose I think.

Not sure what "trank the transition" means, but the field is calculated dynamically if that makes any difference (will automatically recalculate and update its value when one of the other fields are changed). Sorry my suggestion doesn't fit the bill; hope someone else is able to find you something that works. :)

Sorry for typo..."it's track the transition"

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

983 views 3 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you