Uploaded image for project: 'Atlassian Intelligence'
  1. Atlassian Intelligence
  2. AI-234

Pages in renamed spaces show the previous name in search results when a rename is performed via the REST API

    • 2
    • Severity 3 - Minor
    • 0

      Summary

      After renaming a space via a REST API call, the space reference in the search results shows the space name before a rename.

      Steps to Reproduce

      1. Create a new space called "[TEMP PREFIX] Test Cache Space 1"

      curl --request POST \
        --url '<instance>/wiki/rest/api/space' \
        --header 'Content-Type: application/json' \
        --data '{
      "key": "TPTCS1",
      "name": "[TEMP PREFIX] Test Cache Space 1"
      }' \
      --user <email>:<token>

       

      2. Copy a page to the new space

       

      curl --request POST \
        --url '<instance>/wiki/rest/api/content/<sourcePageId>/pagehierarchy/copy' \
        --header 'Content-Type: application/json' \
        --data '{
      "copyAttachments": true,
      "copyPermissions": true,
      "copyProperties": true,
      "copyLabels": true,
      "destinationPageId": "<targetSpaceHomePageId>"
      }' \
      --user <email>:<token>
      

      3. Rename the space to "Test Cache Space 1"

       

       

      curl --request PUT \
        --url '<instance>/wiki/rest/api/space/TPTCS1' \
        --header 'Content-Type: application/json' \
        --data '{
      "name": "Test Cache Space 1" 
      }' \
      --user <email>:<token>
      

       

       

      Expected Results

      The search results show the renamed space as space name so "Test Cache Space 1" in our example.

      Actual Results

      The search results show the space name before the rename.

      The screenshots show that the space name is "[TEMP PREFIX] Test Cache Space 1" in both the quick search and the advanced search results:

      Notes

      The same steps performed in the UI will show the renamed space name in the search results.

      This happens because the space name is indexed at the page level so a re-index of the pages is required for the space name to be updated. This explains why, after modifying a page, a new search will show the correct space name.

      Workaround

      Please reach out to Atlassian Support by using the following link and ask for a re-index: https://support.atlassian.com/contact/.

            [AI-234] Pages in renamed spaces show the previous name in search results when a rename is performed via the REST API

            SET Analytics Bot made changes -
            Support reference count New: 2
            Brett Findlay made changes -
            Assignee Original: Brett Findlay [ b3074c60c65e ] New: Justin Dong [ 89dc7443aab8 ]
            Brian Sandman made changes -
            Assignee Original: Brian Sandman [ d08451ee5ad7 ] New: Brett Findlay [ b3074c60c65e ]
            Brian Sandman made changes -
            Component/s Original: Search - Indexing [ 75295 ]
            Component/s New: XP - Content Search [ 75299 ]
            Brian Sandman made changes -
            Status Original: Long Term Backlog [ 12073 ] New: In Progress [ 3 ]
            Brian Sandman made changes -
            Assignee Original: Ying Wang [ ywang2@atlassian.com ] New: Brian Sandman [ d08451ee5ad7 ]
            pqz made changes -
            Component/s Original: Search - Indexing [ 46493 ]
            Component/s New: Search - Indexing [ 75295 ]
            Key Original: CONFCLOUD-72137 New: AI-234
            QA Demo Status Original: Not Done [ 14330 ]
            QA Kickoff Status Original: Not Done [ 14234 ]
            Support reference count Original: 4
            Project Original: Confluence Cloud [ 18513 ] New: Atlassian Intelligence [ 23110 ]
            SET Analytics Bot made changes -
            UIS Original: 1 New: 0
            SET Analytics Bot made changes -
            Support reference count Original: 3 New: 4
            SET Analytics Bot made changes -
            UIS Original: 0 New: 1

              89dc7443aab8 Justin Dong
              ccurti Caterina Curti
              Affected customers:
              11 This affects my team
              Watchers:
              14 Start watching this issue

                Created:
                Updated: