I have three status,"SIT Testing", "SIT Done" and "ReToDo"
And I want a field to show the date of transit to "SIT Done" or "ReToDo" from "SIT Testing".
How to do it?
Does it can be true?
package com.onresolve.jira.groovy.test.scriptfields.scripts
import com.atlassian.jira.component.ComponentAccessor
def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
def created = changeHistoryManager.getChangeItemsForField(issue, "status").reverse().find {
if(it.fromString=="SIT Testing")
it.toString == "SIT Done" || it.toString == "ReToDo"
}?.getCreated()
def createdTime = created?.getTime()
createdTime ? new Date(createdTime).format("yyyy/MM/dd") : null
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.