Hello,
we having a scripted field which can calculate the total time spent on each issue. which showing up some errors but working fine. but, looks like throwing some errors. when we tried to re-index, script runner those errors are blocking the re-index process and even after 24hours re-indexing is 0%. when we re-index after disabling script runner, it was done in 4-5 hours.
we found the errors of script runner and trying to fix them but unfortunately, script runner folks cannot join the call to resolve the issue and they take 48 hours to just make a reply comment on we're having a hard time fixing this script from more than a month.
any help to fix this script would be appreciated.
import com.atlassian.core.util.DateUtils
def resolvedNames = ["Resolved", "Closed"]
def timeDiff;
if (issue.getStatus().name in resolvedNames) {
timeDiff = issue.getResolutionDate().getTime() - issue.getCreated().getTime()
} else {
timeDiff = System.currentTimeMillis() - issue.getCreated().getTime()
}
return timeDiff/(1000*60*60)