I am trying to pull time spent to calculate the cost of an issue, but am unable to do so. Does anyone see something wrong with what I am doing?
<!-- @@Formula: public static double CalculateSubTotal(Double timeSpent) { if (timeSpent != null) { return timeSpent * 60; } else { return 0; } } CalculateSubTotal(Double.parseDouble(issue.get("timespent"))) -->
The Time Spend field is of type Long, not String. So your formula should look like:
<!-- @@Formula: public static double CalculateSubTotal(Long timeSpent) { if (timeSpent != null) { return timeSpent * 60; } else { return 0; } } CalculateSubTotal(issue.get("timespent")) -->
I figured it was something simple, but just couldn't see it. Thank you!
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.