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

Accepted Answer
0 votes

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
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

26,333 views 2 7
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