I have a script that works really well to subtract days from a custom field. That is, until I need to subtract more than 24 days.
Here are the details:
customfield_14082 = 2018-09-15 00:00
Subtracting 14 days script returns 2018-09-01 00:00 - PERFECT! Works 1 thru 24 days.
Subtracting 25 (or greater same issue) returns 2018-10-9 17:02 - What? Why?
Here is the script:
<!-- Subtracts two weeks from the New Business Date (customfield_14082) - David Hogan 04/06/2018
@Formula:
if (issue.get("customfield_14082") == null)
return null;
long ms = issue.get("customfield_14082").getTime() - 25*24*60*60*1000;
date = new Date(ms);
return date;
-->
Any assistance appreciated!
David