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.ComponentAccessor
import com.atlassian.jira.issue.Issue
def issue = ComponentAccessor.getIssueManager().getIssueByCurrentKey("NPB-3") // your issue key here
def 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.
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.