Automation For Jira - How to fetch the rule creator username from the database

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

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

The purpose of this article is to provide a way to get the full list of automation rules with their creator's username and creation date directly from the database, via an SQL query.

環境

Any version of Jira Data Center, Jira Software or Jira Service Management, with Automation for Jira bundled or installed as a user installed app.

ソリューション

You may run the SQL query below on Jira's Database. 

(info) The suggested query was written for a PostgreSQL database and may require some editing to run in a different type of database, like stripping of double-quotes from table names and columns — and adding the schema to each referenced table if you database's configured with such.

SQL Query for Postgres
SELECT "NAME" AS Rule_Name, "ID" AS Rule_Id,  "STATE" AS Rule_State, "CREATED" AS Created_Date_Time, lower_user_name AS Author_Username
FROM "AO_589059_RULE_CONFIG"
JOIN app_user ON "AUTHOR_KEY" = user_key;

Example of output


|rule_name             |rule_id|rule_state|created_date_time      |author_username|
|----------------------|-------|----------|-----------------------|---------------|
|Test Rule             |1      |ENABLED   |2025-01-08 09:58:54.128|user1          |
|Webhook Test          |2      |ENABLED   |2025-01-09 15:07:47.897|user2          |
|Rule created by Julien|4      |ENABLED   |2025-01-14 10:09:35.858|julien         |


最終更新日: 2025 年 1 月 14 日

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

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