Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,369,925
Community Members
 
Community Events
168
Community Groups

Get the repository and branch names from the development panel.

Edited

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.

1 answer

0 votes

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 

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events