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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,464,918
Community Members
 
Community Events
176
Community Groups

Calculate the difference between two custom fields

Edited

I am attempting to calculate the difference between two custom fields (in days) and populate the result into a number field. 

See screenshot below for what I have entered.

 

I get an error message which states "Additional fields contains invalid field(s) in 'update' or 'fields' section: Custom Field Name" but this does not tell me at all where the issue is. I have tried various variations but get no where.

Jira error.png

 

Thanks for your help.

2 answers

2 accepted

4 votes
Answer accepted

Hi @Dave Jones 

I recreated this, using the Start Date and End Date fields, and using this smart value:

{{issue.customfield_10123.diff(issue.customfield_10456).days}}

^ And it worked as expected.

What does the rest of your rule look like? Are these both Date Picker fields?

Ste

Thank you for your quick response. I have tried the same as you entered but it still does not work for me:

 

Jira error.png

 

Below are the screenshots of the custom fields so you can see their IDs:

 

Date Root Cause Populated.pngDate Assigned to AEMO.png

 

Here is the rest of the rule, but there does not seem to be anything unusual? I should explain I am very new to this so I am probably missing something basic.

 

Automation Rule.png

1 vote
Answer accepted

Hi @Dave Jones and welcome to the community,

Are these two custom field date fields? From the looks of it, the second field, to which you have append the suffix .value, isn't a date field. So I'm not sure you can calculate the difference in days.

Hello Alex. I have posted screenshots of both custom fields above. They are both Date fields. I have tried without the value suffix and it still does not work.

@Dave Jones close the additional fields (JSON) which you have opened ("more options").

:) Thank you. That was it.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events