I have created a numeric scripted field to obtain the difference in minutes from the update field and today date.
the code that I used is the following:
import org.joda.time.DateTime
import groovy.time.*
Date updatedate
Date todaydate
updatedate = new DateTime(issue.updated).toDate()
todaydate = new DateTime().toDate();
def milsec = todaydate.getTime() - updatedate.getTime() as double
milsec = milsec / 60000
return milsec.round()
the searcher is numeric. and the template is custom.
$numberTool.format('integer',$value)
in the preview mode I'm getting the correct value, but qhen I check it in the issue navigator I'm viewing random and incorrect values when I refresh the browser.
ANyone have an experiencie doing this type of customization?
thanks in advance.