Fetch Plan Owner Information for Bamboo Plans Using Database 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
This document provides the select query to get plan owner information from a list of plans. This KB also provides the query to find the information of users who are running/building the build plans.
Environment
Tested the query in Bamboo 8.0.4.
Solution
warning
This query is tested in Postgresql type DB. Please make changes if required as per your DB instance type.
plan owners
1
select user_name FROM public.audit_log where Entity_type='Plan' AND msg Like 'Plan has been created%' AND entity_id IN ('ON-ON','THREEF-TWOT');
The above SQL query displays build owners for the example Build-plans that are having key as in "ON-ON" and "THREEF-TWOT" as in ("PROJECTKEY"-"PLANKEY")
To find the information of users who are running/building the build plans you can join the buildresultsummary and the buildresultsummary_customdata table.The information of the username of the individuals would be displayed in the custome_info_value.
users who are running/building the build plans
1
2
3
4
select bs.build_key, bsc.custom_info_value, bsc.custom_info_key, bs.created_date from buildresultsummary bs , buildresultsummary_customdata bsc
where bs.buildresultsummary_id = bsc.buildresultsummary_id
and bsc.custom_info_key ='ManualBuildTriggerReason.userName'
order by bs.created_date desc;
Was this helpful?