How to fetch plan owners information for a list of plans in Bamboo from the database.

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

要約

This document provides the select query to get plan owner information from a list of plans. This KB also provides query to find the information of users who are running/building the build plans.

環境

All supported versions of Bamboo.

Tested the query in Bamboo 8.0.4.

ソリューション

warning

This query is tested in Postgresql type DB. Please make changes if required as per your DB instance type.
plan owners
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
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;



最終更新日 2022 年 7 月 18 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.