I am trying to get the repository and branch names from the development panel. I got this code from another post which is trying to accomplish a similar thing:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.plugin.devstatus.api.DevStatusSummaryService
import com.atlassian.jira.plugin.devstatus.rest.DetailBean
import com.atlassian.jira.user.ApplicationUser
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
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("Test-1")
def details = service.getDetailData(issue.id, "stash", "pullrequest", currentUser).right().get().getDetail()
------------------------------------------------------------------------
But, this 2 imports aren't supported anymore.
import com.atlassian.jira.plugin.devstatus.api.DevStatusSummaryService and
import com.atlassian.jira.plugin.devstatus.rest.DetailBean
Searching for this, seens like devstatus have been discontinued and that is why this code isn't working anymore.
Does anyone know a way for me to get the repository and branch names from an issue in Script Runner? My goal is the create an custom field named "Repository" and another named "Branch" in which i will put the repository and branch names, so i can more easily access this information from Jira.
Sorry for any mistakes in the vocabulary, English isn't my first language.
Hi @Mauricio Garcia Valli Do you got any lead on this we are trying to do the same. Kindly let me know if you got any suggestions. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.