How to link Bamboo builds with Jira issue via DB queries
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The steps outlined in this article are provided AS-IS. This means we've had reports of them working for some customers, under certain circumstances, yet they are not officially supported, nor can we guarantee they'll work for your specific scenario.
You may follow through and validate them on your own non-prod environments prior to production, or fall back to supported alternatives if they don't work out.
We also invite you to contact our Community for matters that are outside Atlassian's scope of support!
The purpose of this page is to provide a DB query which will list all the Bamboo builds with the JIRA issues linked.
Environment
Query has been tested on PostgreSQL DB but should work for other DB types.
Solution
SELECT
BRS.PLAN_NAME,
BRS.BUILD_KEY,
BRS.BUILD_STATE,
BRS.BUILD_DATE,
BRSJ.JIRA_ISSUE_KEY
FROM
BRS_LINKEDJIRAISSUES BRSJ,
BUILDRESULTSUMMARY BRS
WHERE
BRSJ.BUILDRESULTSUMMARY_ID=BRS.BUILDRESULTSUMMARY_ID
ORDER BY BRSJ.JIRA_ISSUE_KEY,BRS.PLAN_NAME
Was this helpful?