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

I wanted to do this and found a solution that worked for me - see

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,870 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot