For all my scripts I am getting error on the import statement. Its not related to any specific pkg import. In general scripts are not working in Script Runner because none of the imports are recognised
// text field containing tiny url *name*
def textFieldName = "Tiny URL"
def issueManager = ComponentAccessor.getIssueManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def jqlQueryParser = ComponentAccessor.getComponent(JqlQueryParser)
def searchService = ComponentAccessor.getComponent(SearchService)
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def commentManager = ComponentAccessor.getCommentManager()
def resolvedIssue = issue
def cf = customFieldManager.getCustomFieldObjectByName(textFieldName)
def tinyUrl = resolvedIssue.getCustomFieldValue(cf)
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 4: unable to resolve class com.atlassian.jira.web.bean.PagerFilter @ line 4, column 1. import com.atlassian.jira.web.bean.PagerFilter ^ Script1.groovy: 1: unable to resolve class com.atlassian.jira.bc.issue.search.SearchService @ line 1, column 1. import com.atlassian.jira.bc.issue.search.SearchService ^ Script1.groovy: 2: unable to resolve class com.atlassian.jira.component.ComponentAccessor @ line 2, column 1. import com.atlassian.jira.component.ComponentAccessor ^ Script1.groovy: 3: unable to resolve class com.atlassian.jira.jql.parser.JqlQueryParser @ line 3, column 1. import com.atlassian.jira.jql.parser.JqlQueryParser ^
Even for other packages I am getting same error
Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events