My project has two issue types i.e story and defect . For story issue type i have one workflow . In that workflow one issue is transition from one status to another status how to get date and time of each status using script runner plug in
Try below script , it should work
import com.atlassian.jira.component.ComponentAccessor
def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
def created = changeHistoryManager.getChangeItemsForField(issue, "status").find { it.toString == "In Progress" }?.getCreated()
def createdTime = created?.getTime()
createdTime ? new Date(createdTime) : null
For more details, you can refer
https://library.adaptavist.com/entity/store-the-time-when-an-issue-was-first-transitioned
Ok, thanks raju gari
But i want to generate a report of each status with date and time
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.