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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I have a custom field that is the result of comparing two date fields?

I want to compare two date fields (one custom and one delivered) and have the result in a separate field.


End date (WBSGantt) minus Due Date and the custom field would be the number of days between.

Is this possible?

2 answers

0 votes

You can probaby tweak a little bit to get it out.

Personally, I'd do it as a "scripted field"

forgive me, I've never done a scripted field, but is what you're saying different from the script Ravi and you mentioned?  Don't I create the 'answer' as a custom scripted field and then attach the script or are there multiple ways we're talking about?

Nothing to forgive, it's a perfectly good follow up question, especially as I've made a mistake!

The script we've pointed at is indeed for a scripted field.  I only glanced at the top bit of it to confirm it was code you might find useful, and assumed it was a post-function that set another field.  It's not, you should indeed paste it into a scripted field definition.

Note that when you create the scripted field, you probably want to set its "searcher" to "number range" and then when you're putting the script in, set the "template" to "number"

0 votes
Ravi Sagar Community Leader Jun 12, 2020

Hi @Angie Affolter 

Take a look at this script here to get started.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

556 views 15 18
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you