Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titlegetArchivedVersions() Groovy Script
def projectKey = "$project$"
import com.atlassian.jira.component.ComponentAccessor 
import com.atlassian.jira.project.version.VersionManager 
import com.atlassian.jira.project.ProjectManager 
import com.atlassian.jira.project.Project 
import com.atlassian.jira.project.version.Version 

VersionManager versionManager = ComponentAccessor.getVersionManager() 
ProjectManager projectManager = ComponentAccessor.getProjectManager() 
    
Project project = projectManager.getProjectByCurrentKey(projectKey) 

def versions=versionManager.getVersionsArchived(project)*.name  
return versions.join("|") 

Returning Null Values From Groovy

Warning

SIL does not accept null values. Never end a Groovy script with "return;". Return empty strings instead.

...