I've been beating my head against this wall and lots of searches have been unfruitful. I am trying to port over a simple scripted field from scriptrunner for jira server to one for jira cloud.
Here is the old 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();
How would I rewrite this in Jira cloud scriptrunner as I can find the field in the rest API but can't actually show the value. Thanks in advance!
Hi @indra ,
Welcome to the community !!
Refer official documentation on how to migrate scripts from server to cloud in https://docs.adaptavist.com/sr4js/latest/scriptrunner-migration/migrating-to-or-from-cloud/migrate-from-scriptrunner-for-jira-server-to-cloud
If you still have concerns, please contact the plugin vendor for assistance through https://www.adaptavist.com/contact?_ga=2.131204362.406165589.1698412308-1430461644.1698226738
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.