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.
How can I access development information of Jira. I also have scriptrunner plugin. Is there any way to extract that information of that section?
Before moving the ticket to next state, I want to check if the code is checked in to bitbucket from that development section of jira.
I checked other posts and with few tweaks I was able to extract the information -
import org.apache.log4j.Logger
import org.apache.log4j.Level
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 log = Logger.getLogger("Dev Summary")
log.setLevel(Level.INFO)
log.info('....')
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()
log.info(details)
Hello @sbhutada ,
i have similar request , where i would like to know if any pull request is still open before making the transition.
Could you let me know where i have to write the above code in post function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
devstatussummaryservice not accessible that way anymore.
but still works with this:
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-2")
def details = service.getDetailData(issue.id, "stash", "pullrequest", currentUser).right().get().getDetail()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.