Uploaded image for project: 'Automation for Jira Server'
  1. Automation for Jira Server
  2. JIRAAUTOSERVER-1048

Make the columns of the automation rule table customizable

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Configuration
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Summary

      Jira administrators and project admins can find a list of Automation for Jira (A4J) rules at ⚙️ (gear icon) > System > Automation rules and project settings > Automation, respectively. By default, this provides a list (dynamic table) of rules with name, owner, project, and enabled columns. As a Jira/project admin, I'd like to customize these columns to include any rule metadata listed in the rule details.

      Workaround

      Both workarounds require accessing Automation for Jira's internal touchpoints. These workarounds are provided "as is" by Atlassian Support.

      REST API approach

      A4J Data Center currently doesn't have an official REST API. However, advanced users can utilize the internal REST API to obtain and analyze rule configurations:

      GET <jira-base-url>/rest/cb-automation/latest/project/{projectId}/rule
      curl -L -X GET '<jira-base-url>/rest/cb-automation/latest/project/GLOBAL/rule' \
      -H 'Authorization: Bearer your-pat-here'
      

      (GLOBAL can be replaced with a project ID. You can obtain a project's ID with GET /api/2/project/{projectKey}.)

      [
          {
              "id": 1,
              "clientKey": "com.codebarrel.tenant.global",
              "name": "Example",
              "state": "ENABLED",
              "canOtherRuleTrigger": false,
              "notifyOnError": "FIRSTERROR",
              "authorAccountId": "JIRAUSER10000",
              "actorAccountId": "JIRAUSER10000",
              "created": 1721861249715,
              "updated": 1721861249715,
              ...
          }
      ]
      

      (User keys can be disambiguated with GET /jira/rest/api/2/user.)

      Database approach

      You can also obtain this info directly from the database. The following examples are written for PostgreSQL:

      SELECT "ID", "NAME", "AUTHOR_KEY", "ACTOR_KEY" FROM "AO_589059_RULE_CONFIG";
      
      SELECT rc."ID"            AS rule_id,
             rc."NAME"          AS rule_name,
             au.lower_user_name AS actor_username,
             p.pkey             AS project_key,
             p.pname            AS project_name
      FROM "AO_589059_RULE_CONFIG" rc
               JOIN app_user au ON au.user_key = rc."ACTOR_KEY"
               JOIN "AO_589059_RULE_CFG_PROJ_ASSOC" rcpa ON rcpa."RULE_CONFIG_ID" = rc."ID"
               JOIN project p ON p.id::VARCHAR = rcpa."PROJECT_ID"
      WHERE p.pkey = 'KEY';
      

              Unassigned Unassigned
              1353e2e9fd2f Benjamin S
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: