Question about the Calculated Date/time field

I have JIRA Miscellaneous Custom Fields add-on installed, and I'm try to setup a custom field of type Calculated Date/Time.

I want to know the number of days between when an issue is resolved, and when it has completed independent verification. I already have a custom field called "VerifyEnd" (FieldID=11200) that automatically posts the current date on transition out of the Verification state.

It seems like this forumula should work, but I'm not having any luck. Suggestions?

<!-- @@Formula: org.apache.commons.lang.time.DateUtils.addDays(issue.get("resolution_date"),("FieldId=11200")) -->

3 answers

1 accepted

First of all, I don't see what you mean by "("FieldId=11200")" in your formula.

Then, I believe you want a date difference, not to add two dates. There are several examples in other questions:

https://answers.atlassian.com/questions/250567/using-current-date-no-time-component-in-a-date-range-calcualtion

https://answers.atlassian.com/questions/250563/jira-misc-custom-fields-date-interval-calculation-ignoring-weekends

Thanks. "("FieldId=11200")" is the FieldID of a custom field in my instance. I believe that is the correct syntax to have the formula recognize it.

I've never seen this syntax, and I'm positive it cannot be used in your context. Custom field names are in the form: "customfield_11200". So issue.get("customfield_11200") will return the value of that field.

Yep, you are right, I mis-read some instructions. Thanks! I'll see if this clears up my problem.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

184 views 0 4
Read article

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