Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Get issue keys in bamboo build with scriptrunner

we are currently experimenting with Script runner for Bamboo and would like to know how to get the issue keys that are part of the build.

2 answers

Apologies for the delay in responding.

I've assumed that the Jira issue keys your talking about appear in the "Issues" tab as "Linked Issues" on your build?

If so you'll need to replace the planKey in the example below and run the script below in the Script Console:

import com.atlassian.bamboo.plan.PlanKey
import com.atlassian.sal.api.component.ComponentLocator

def jiraIssueResultsManager = ComponentLocator.getComponent(JiraIssueResultsManager)

def planKey = "KEY"

def issues = jiraIssueResultsManager.findJiraIssuesForPlanKey(new PlanKey(planKey))

issues.collect { issue ->
"$issue.issueKey, $issue.issueType.linkDescription, $issue.issueType.linkType"

That will show you the issue key, link description and link type.

Let us know how that goes.


Thanks Adam this help. One more this, how do i pass the plan key as parameter.

The example I posted should show you how that's done. The line your interested in is:

def issues = jiraIssueResultsManager.findJiraIssuesForPlanKey(new PlanKey(planKey))

Or do you mean how we put the plan key into the output along with the link types?

Suggest an answer

Log in or Sign up to answer
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

109 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you