Posted by:.

One thought on “How to get a list of Statuses of Jira with Groovy

  1. Example to search for statuses that contains some text

    import com.atlassian.jira.component.ComponentAccessor
    import com.atlassian.jira.config.StatusManager
    StatusManager statusManager = ComponentAccessor.getComponentOfType(StatusManager.class)
    def statuses = statusManager.getStatuses()*.getName()
    def i = 0
    def result = ""
    while (i < statuses.size()) {
    if ( statuses[i].toLowerCase().contains("prod"))
        result= result + "," + statuses[i] 
    return result


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s