Identify all Automation Rules executed by an specific actor
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
In Automation for Jira, all automation rules are executed by the user that has been configured as the Rule Actor.
In some instances, it may be useful to be able to identify all rules that are configured with a certain actor, be it for audit purposes, or in order to swap the actor with someone else, and this article aims to provide options on how to do just that.
You may also be interested in searching for Automation Rules configured for a specific project.
We currently have the following feature request to improve A4J's automation search functionality JIRAAUTOSERVER-1109 - Getting issue details... STATUS . If this topic interests you, be sure to vote and watch the feature to be informed about future updates.
環境
Any version of Jira Data Center, Jira Software or Jira Service Management, with Automation for Jira bundled or installed as a user installed app.
ソリューション
UI Method
The first option that may be explored for this end, is by utilizing the Transfer Users native A4J feature that can be accessed through its UI. Note that this method requires that you are a Jira admin in order to access the automation console, and it will also return rules that are owned by a certain user, but where they may not be the actor.
Jira 管理で [システム] > [自動化ルール] の順に選択します。グローバルな [自動化] 画面に移動します。
In the top right corner, select … > Transfer User.
On the Select users screen, for the Find User field, select the user you want to search for. For the Replace with you may select any user as we'll not be performing the change at the next step.
Preview the changes, and you'll receive a list of all rules that this user owns or is the actor for.
- (Optional) If you want to migrate the rules to a different user, you may utilize this method and proceed to Submit, otherwise, do not Submit the changes.
DB Method
In case you do not have Jira administrative rights, or you want to obtain the list of rules for the actor specifically, another option to explore would be to search the Jira database.
As it's usual in the Jira database, user references are made by the user_key, which may not always match the username of a person, therefore, we'll need to perform a join in order to obtain the information we are looking for.
For both queries, you only need to insert the username for the person you are looking for (all in lowercase) at the WHERE filter.
Alternatively, you may also remove the WHERE filter in order to get a full listing of the automation rules along with their actors.
SELECT "NAME" AS Rule_Name, "STATE", "ACTOR_KEY", lower_user_name AS username
FROM "AO_589059_RULE_CONFIG"
JOIN app_user ON "ACTOR_KEY" = user_key
WHERE lower_user_name = 'lowercase_username';
SELECT NAME AS Rule_Name, STATE, ACTOR_KEY, lower_user_name AS username
FROM AO_589059_RULE_CONFIG
JOIN app_user ON ACTOR_KEY = user_key
WHERE lower_user_name = 'jira.automation';