Project-scoped Jira Automation fails to load Confluence spaces in the Publish new Confluence page action

XMLWordPrintable

    • Severity 3 - Minor
    • Jira Software, Jira Service Management, Jira Work Management, Jira Product Discovery

      Issue Summary

      When creating a project-scoped Jira Automation rule, the Publish new Confluence page action does not display any Confluence spaces in the Space dropdown.

      Analysis of the browser HAR file shows that the GraphQL request sent to fetch Confluence spaces differs between project-scoped and global automation rules.

      For project-scoped automation rules, the request to gateway/api/graphql with the operation name SpaceSelectorQuery sends the following payload:

      {"cloudId": "02dd5712-xxxx-428e-xxxx-272fxxxxx6a4", "spaceIds": ["10085"]}

      The value passed in spaceIds corresponds to the Jira project ID, not a Confluence space ID. As a result, no Confluence spaces are returned and the dropdown remains empty.

      For global automation rules, the request correctly sends:

      {cloudId: "02dd5712-xxxx-428e-xxxx-272fxxxxx6a4", cql: "type = 'space'", limit: 50}

      This correctly retrieves the available Confluence spaces, allowing the user to select a space.

      The issue appears to be caused by the frontend generating an incorrect GraphQL payload for project-scoped automation rules

      Steps to Reproduce

      1. Navigate to a Jira project.
      2. Open Project settings → Automation.
      3. Create an automation rule.
      4. Add the Publish new Confluence page action.
      5. Click the Space dropdown. The spaces would not appear on the dropdown list.
      6. Repeat the same steps using Global Automation (System settings → Global Automation), the Confluence spaces are successfully displayed.

      Expected Results

      The Publish new Confluence page action should display the list of available Confluence spaces in both project-scopedand global automation rules by sending the correct GraphQL query to retrieve Confluence spaces.

      Actual Results

      For project-scoped automation rules, the frontend sends the Jira project ID in the spaceIds field of the SpaceSelectorQueryGraphQL request instead of querying for available Confluence spaces. Consequently, no spaces are returned and the Space dropdown remains empty.

      Global automation rules function correctly because they use a CQL-based query to retrieve the available Confluence spaces.

      Workaround

      Create the automation rule within the project and configure all required components except the Publish new Confluence page action. Save the rule without enabling it.
      Then:

      1. Navigate to Global Automation.
      2. Open the automation rule and temporarily change its scope from Single project to Global.
      3. Edit the Publish new Confluence page action and select the desired Confluence space from the dropdown (the spaces are populated correctly in the Global scope).
      4. Save the action.
      5. Change the rule scope back to the original Single project scope.
      6. Save and enable the rule.

      This allows the Confluence space to remain configured even after changing the rule back to a project-scoped automation.

              Assignee:
              Unassigned
              Reporter:
              Krishnam
              Votes:
              20 Vote for this issue
              Watchers:
              19 Start watching this issue

                Created:
                Updated: