You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi
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
import com.atlassian.jira.bc.issue.search.SearchService
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.jql.parser.JqlQueryParser
import com.atlassian.jira.web.bean.PagerFilter
// 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)
error
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