When importing workflows (XML) from other instances all of the instance specific statuses in the workflow are missing. I have then to manually recreate them. Is there a way to create statuses with groovy scripts?
I would then create the specific statuses first, get their IDs and add them to the xml workflows to import.
You can try like this
import com.atlassian.jira.config.StatusManager
import com.atlassian.jira.component.ComponentAccessor
def statusManager = ComponentAccessor.getComponent(StatusManager.class)
def status = statusManager.createStatus("statusname", "Status Name", "/images/icons/statuses/inprogress.png")
log.error(status)
Thanks Alexey, works perfectly!
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.