Hi,
I have Jira Misc Custom Fields, and have created a custom calculated Date/Time field which I would like to populate with the date, 30 calendar days from when the issue is created.
This is what I am using in the description at the moment...
<!--@@Formula: DateTime added = dt.plusDays(30); -->
<!-- @@Format: DATE -->
I have attempted a few different variations of this and sadly not getting anywhere. If anyone knows of something obvious I am missing, or better yet knows the formula that works, I would love to hear from you! :)
Cheers
J
I assume you're using JMCF 1.7 (in 2.x, you'd be using Groovy and the new editor).
Try this:
<!--@@Formula: new Date(new Date().getTime() + 30*24*3600000L) -->
<!-- @@Format: DATE -->
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you know what changes I would need to make to the above to SET the date to 30 days?
At the moment I have noticed that the formula gets the date 30 calander days from the current date, but will keep changing it everyday.
I have tinkering around with it a little, but no joy yet..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jason,
the value of a calculated field is, by definition... calculated. Not stored. If you need a custom field to store a date that you calculate during a transition (or issue creation), you need a standard Date Picker or Date/Time Picker field, and a post-function, such as JMWE's Set Field Value post-function, to set its value during the transition to the following Groovy Expression value:
new Date() + 30
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.