I am not sure that where I am going wrong on this is in the date section. I am trying to create a formula that will return a value based on the following formula.
Priority = (revenue/365)/(goal date - today)
Here is what I have but I am getting an error when the formula tries to calculate.
revenue = issue.get("Incremental Revenue")
days = 365
goal = issue.get("Goal Date")
today = new Date().format("yyyy-MM-dd")
if (revenue == null) return null;
if (revenue == 0) return 0;
if (goal == null) return null;
return (revenue/days)/(goal-today)I am using a jira calculated field from JMCF