Hey guys,
I have a custom field to show the date of first to SIT Done
But the date format is not what I want
I want like "yyyy/mm/dd" format.
But I have no idea how to do it.
Can someone tell me?
And below is my code
package com.onresolve.jira.groovy.test.scriptfields.scripts
import com.atlassian.jira.component.ComponentAccessor
def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
def created = changeHistoryManager.getChangeItemsForField(issue, "status").find {
it.toString == "SIT Done"
}?.getCreated()
def createdTime = created?.getTime()
createdTime ? new Date(createdTime) : null
Just add this code will reach my purpose
createdTime ? new Date(createdTime).format("yyyy/MM/dd HH:mm") : null
Hi @Harry Huang ,
You customize the way times and dates are presented to users throughout the JIRA user interface. When specifying dates and times, they should be based on the Java SimpleDateFormat.
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.