Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How do I calculate variance (number) between 2 custom field date fields (baseline date and due date)

I have created 2 custom field date fields (baseline date and due date)

I have also created a third custom numeric field called variance.

How can I get the following result

baseline date - 15 Apr 2021

due date - 30 Apr 2021

variance in days is -15

I have been trying automation but no luck. appreciate if you can provide solution thanks

3 answers

0 votes
Rohan Swami Atlassian Team May 24, 2021

@hdave I'm a Product Manager on the Jira Software team, I'd love to get a deeper understanding of what you're looking to achieve with these calculations in Jira Software. Could you drop me a message at r swami @ atlassian . com and we can arrange a call to discuss?

doing now... thanks Rohan

0 votes
Curt Holley Community Leader May 20, 2021

Using Automation for Jira you should be able to populate your variance field by putting something like this in it.

As in, use the edit issue action, select the Variance field and add:

{{(issue.baseline date).diff(issue.due date).days.abs}}

Then hit "enter" on your keyboard (to make it stick)

Have a look at this page for further assistance Smart values - date and time functions | Jira Software Cloud | Atlassian Support 

0 votes

@hdave -

Can you confirm if this ask is related to Advanced Roadmap?  Based on your ask, I am assuming you are referring to Jira custom fields setup and it is really not related to Advanced Roadmap.  If it is for Jira custom fields setup, then you can create "Scripted Field" (essentially a calculated field) to achieve what you are asking.

The create "Scripted field" in Jira, you will need Script Runner for Jira add-on (An excellent add-on to have in your system from my years of Jira admin/functional leads experiences)

In our environments, we have many scripted fields that provide variance dynamically and we expose them into our Jira/JSM projects issues.

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

thanks Joseph What I need is a variance in date fields .. since there is no function for data 1-date 2 , i had to use a third field. I would ideally like to manage it out of box - with no extra plugins but if there is no way out then I will have to apply the plugin thanks 

@hdave -

Can you confirm what application are you referring?  Jira Software or JSM?  In addition, what is your env type? (CLOUD or Data Center)

Best, Joseph

Like Curt Holley likes this
Curt Holley Community Leader May 21, 2021

Good questions @Joseph Chung Yin  I always assume people are on Cloud ☁

Like Joseph Chung Yin likes this

@Curt Holley -

If the user's env is JSM cloud (non-premier account), then I don't believe Automation for Jira is a auto add-ons.  Anything associated with DC or server env, Automation for Jira is a separate paid add-on.

Best, Joseph 

Curt Holley Community Leader May 21, 2021

I think It is available of Cloud standard @Joseph Chung Yin , but has restrictions on Multi Project and Global rule executions. Agreed plug-in for non-cloud 👍

Definitely be good to know exactly what setup @hdave is using.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events