Hi Team,
We have migrated from DC to the cloud, we have a scripted field in DC, but we are not getting the script for the cloud. below is the DC script.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.IssueManager
def statusChanges = ComponentAccessor.getChangeHistoryManager().getChangeItemsForField(issue, "status")
StringBuffer buffer = new StringBuffer();
for( com.atlassian.jira.issue.history.ChangeItemBean changeStatus : statusChanges )
{
String fromStatusId = changeStatus.getFrom()
String toStatusId = changeStatus.getTo()
buffer.append(changeStatus.getCreated().toString() + " : " + ComponentAccessor.getConstantsManager().getStatusObject(fromStatusId).getSimpleStatus().getName() + " -> " + ComponentAccessor.getConstantsManager().getStatusObject(toStatusId).getSimpleStatus().getName());
buffer.append("<br/>");
}
return buffer.toString();
Thanks,
Indra