Find how many plans use each type of repository
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
Scenario
To know how many plans use each type of repository, you can run this SQL query:
1
2
3
4
5
6
7
SELECT vl.plugin_key AS repository_type, COUNT(vl.plugin_key) AS plans_sum
FROM plan_vcs_location AS pvl
JOIN vcs_location AS vl ON pvl.vcs_location_id = vl.vcs_location_id
JOIN build AS b ON b.build_id = pvl.plan_id
JOIN project AS p ON b.project_id = p.project_id
GROUP BY repository_type
ORDER BY total_of_plans DESC;
Sample Result
REPOSITORY_TYPE | PLANS_SUM |
---|---|
com.atlassian.bamboo.plugin.system.repository:svn | 2 |
com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-git:git | 1 |
Was this helpful?