I wanted to get the date when the status was modified from one status, kindly help me to find a way.
I am able to get the status object using "issue.getStatus()" but it didn't have any date field.
Try this:
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.Issuedef issue = ComponentAccessor.getIssueManager().getIssueByCurrentKey("NPB-3") // your issue key heredef statuses = ComponentAccessor.getChangeHistoryManager().getChangeItemsForField(issue, "status").reverse().each{ it -> log.debug "from status ${it.fromString} to status ${it.toString} on ${it.created}"}
@Kyle MoseleyThanks for your Reply.
I used the below code to get all the changeHistory of an Issue.
List<ChangeItemBean> changeItemBeans = ComponentAccessor.getChangeHistoryManager().getChangeItemsForField(issue, "status");
Also i hope using this i can get the work logged date.
It looks like you're new here. Sign in or register to get started.