Hi,
Please see script below:
<!-- @@Formula:
if (issue.get("customfield_15320")==null || issue.get("customfield_15317") == null)
return null;
return (issue.get("customfield_15320").getTime() - issue.get("customfield_15317").getTime()) / 1000 / 3600 / 24; -->
I am looking to subtract today date from custom field 15320.
Thanks
Hello,
Are you using Misc custom fields add-on? If so, in the documentation it says you can get the current date as:
import
org.joda.time.DateTime
DateTime date =
new
DateTime();
Here is the documentation:
Regards.
Hi Elifcan,
Yes i'm using the custom fields add-on. Do you know how I can subtract todays date from field 15320 into the custom number field?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You can use it like this:
return(issue.get("customfield_15320").getTime() - (new Date()).getTime()) / 1000 / 3600 / 24
Regards.
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.