Removing permissions from the Confluence Space connected to a Jira project breaks "Project pages"

XMLWordPrintable

    • 11
    • Minor
    • 2

      Issue Summary

      Project Pages in Jira project throw error, if no one has access to already linked page/space in confluence.

      Issue happens because when we add new Confluence Page or space, the system is not able to delete the previously linked page or space because user does not have access to that.

      Steps to Reproduce

      1. Create a Confluence Space, say Space1
      2. Open any Jira Software project and go to "Project Pages".
      3. Link the Confluence Space, Space1 to this project.
      4. Navigate to Space1 in Confluence
      5. Go to Space Settings -> Space Permisisons -> Users. Remove all permissions from Users.
      6. Repeat Step 5 for Groups as well.
      7. Come back to the Project Pages and refresh the page and the error will be visible.
      8. Link another Confluence Page/Space. The page will be linked at first, but on refreshing the Project Pages in Jira, the error will come again.

      Expected Results

      The old space should be replaced when the new space is linked to the project.

      Actual Results

      On UI, the below error is seen:

      Workaround

      • Navigate to project Pages of Affected project
      • right click on webpage > Inspect > Network
      • Reload the project pages webpage where you see error
      • Stop the logs and filter by "graphql". Ideally only 3 requests should be there, check the third one.
      • Note the space or page ids showing "data": null

      For example :
      Space ID -  9437188 (as per the response in the above code snippet)

      Payload:

      {
        "query": "\n  mutation deleteConfluenceRelationship($fromAri: ID!, $toAri: ID!) {\n    devOps {\n      ariGraph {\n        deleteRelationships(\n          input: {type: \"project-documentation-entity\", from: $fromAri, to: $toAri}\n        ) {\n          success\n          errors {\n            message\n          }\n        }\n      }\n    }\n  }\n",
        "variables": {
          "fromAri": "ari:cloud:jira:<cloudID>:project/<projectID>",
          "toAri": "ari:cloud:confluence:<cloudID>:space/<problematic space id>"
        }
      } 

      NOTE: In the above payload make the following replacements:

      • To get the cloud ID, run the API:
        GET https://<cloud-url>.atlassian.net/_edge/tenant_info
      • To get the project ID, run the API:
        GET https://<cloud-url>.atlassian.net/rest/api/3/project/<project_key>/
      • Similarly, for Page, use the following payload :
        {   "query": "\n  mutation deleteConfluenceRelationship($fromAri: ID!, $toAri: ID!) {\n    devOps {\n      ariGraph {\n        deleteRelationships(\n          input: {type: \"project-documentation-entity\", from: $fromAri, to: $toAri}\n        ) {\n          success\n          errors {\n            message\n          }\n        }\n      }\n    }\n  }\n",   "variables": {     "fromAri": "ari:cloud:jira:<cloudID>:project/<projectID>",     "toAri": "ari:cloud:confluence:<cloudID>:page/<problematic page id>"   } }  

      Alternatively, please reach out to Atlassian Support.

            Assignee:
            Jake Strauss
            Reporter:
            Krishnam
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: