I have a scripted field that gets the date an issue was closed using this code:
import com.atlassian.jira.ComponentManager
def componentManager = ComponentManager.getInstance()
def changeHistoryManager = componentManager.getChangeHistoryManager()
changeHistoryManager.getChangeItemsForField(issue, "status").find {it.toString == "Closed"}?.getCreated()
Which works OK as a text field but I want to use it as a date time field - so it apears with all the other dates on the screen.
I just get:
$datePickerFormatter.format($value)