You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi, how can I resolve the following?
running JIRA 6.4.7 and Scriptrunner 4.1.3.5
import com.atlassian.core.util.DateUtils def resolvedNames = ["Resolved", "Closed"] def timeDiff; if (issue.statusObject.name in resolvedNames) { timeDiff = issue.getResolutionDate().getTime() - issue.getCreated().getTime() } else { timeDiff = System.currentTimeMillis() - issue.getCreated().getTime() } DateUtils.getDurationString(Math.round(timeDiff / 1000))
Error -
image2015-12-10 12:5:49.png
You can probably just do a cast there:
DateUtils.getDurationString(Math.round((timeDiff / 1000) as Double))
Not exactly sure what's going on, but it's obviously having trouble inferring the type for "timeDiff / 1000".
It's safe to ignore the type checking information... https://scriptrunner.adaptavist.com/latest/jira/#_static_type_checking
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.