Identify all Automation Rules executed by an specific actor
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
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. If this topic interests you, be sure to vote and watch the feature to be informed about future updates.
Environment
Any version of Jira Data Center, Jira Software or Jira Service Management, with Automation for Jira bundled or installed as a user installed app.
Solution
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.
In Jira administration, select System > Automation rules. You’ll be navigated to the global Automation screen.
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.
Query for Postgres
1
2
3
4
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';
Query for MySQL
1
2
3
4
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';
Was this helpful?