Hi.
I'm writing a Scriptrunner script to manage Bamboo build plans upon Jira issue status change. For that I need to get an assigned to the issue branch. I do it that way:
import com.atlassian.jira.plugin.devstatus.impl.DefaultDevStatusSummaryService
def ccm = ComponentAccessor.getComponentClassManager()
def service = ccm.newInstance("com.atlassian.jira.plugin.devstatus.impl.DefaultDevStatusSummaryService")
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
//def issue = ComponentAccessor.getIssueManager().getIssueObject("CDI-5")
def details = service.getDetailData(issue.id, "stash", "pullrequest", currentUser).right().get().getDetail()
When I have first line with "import" commented out it works fine but syntax checker in the script editor underlines last line with "service.getDetailData" with error that "getDetailData" is unknown for "java.lang.Object", which is understandable. But if I uncomment first line I get a compiler error "unable to resolve class com.atlassian.jira.plugin.devstatus.impl.DevStatusSummaryService". Why is that?
If I comment out first line and check type of the "service" variable I get:
class com.atlassian.jira.plugin.devstatus.impl.DefaultDevStatusSummaryService