Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-15317

Confluence spaces cannot be searched when configuring a knowledge base in a JSM project

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 5.12.0, 5.12.8
    • Knowledge Base

      Issue Summary

      Under some conditions, Confluence spaces cannot be searched when configuring a knowledge base in a JSM (Jira Service Management) project. When searching for a string contained in the space name, no results are returned.

      Environment

      • Jira Service Management (JSM) Server/Data Center on any version 5.12.x (lower and higher versions are potentially impacted too)
      • Confluence Server/Data Center on any version 8.5.x

      Steps to Reproduce

      1. Install JSM
      2. Install Confluence
      3. Configure an application link between both application using "Impersonation (with oauth)", using the admin user from JSM and Confluence
      4. In Confluence:
        • Login as the Confluence Admin:
          • Create a blank space called "MAX", and another space called "Another Space with MAX name"
          • Create a new user called "Maxime Rey"
        • Login as the new user Maxime, and create a new personal space
      5. In JSM
        • Login as the admin user
        • Create a new JSM project
        • Go to the page Project Settings > Knowledge Base
        • Select the Confluence application in Application
        • Search for the string "MAX" in Link Space

      Expected Results

      The "Select Space" dropdown should show results:

      • MAX
      • "Another Space with MAX name"
      • The personal space from Maxime

      Actual Results

      The "Select Space" does not show any result:

      If we collect a HAR file, we can see that the end point that is hit to search for the "MAX" string is returning the right results even though the "Select Space" dropdown is not showing anything:

      {
          "queryTokens": [
              "max"
          ],
          "query": "max",
          "totalSize": 4,
          "contentNameMatches": [
              [
                  {
                      "id": "393220",
                      "name": "MAX",
                      "href": "/confluence/display/MAX",
                      "className": "content-type-spacedesc",
                      "spaceName": "MAX",
                      "spaceKey": "MAX"
                  },
                  {
                      "id": "393236",
                      "name": "Another Space with MAX name",
                      "href": "/confluence/display/DTM",
                      "className": "content-type-spacedesc",
                      "spaceName": "Another Space with MAX name",
                      "spaceKey": "DTM"
                  }
              ],
              [
                  {
                      "id": "1441794",
                      "name": "Maxime Rey",
                      "href": "/confluence/spaces/viewspace.action?key=~maxime",
                      "className": "content-type-personalspacedesc",
                      "spaceName": "Maxime Rey",
                      "spaceKey": "~maxime"
                  }
              ],
              [
                  {
                      "name": "Search for ‘max’",
                      "href": "/confluence/dosearchsite.action?queryString=max",
                      "className": "search-for"
                  }
              ]
          ]
      }
      

      Notes

      • If no query string is entered, all the spaces are found ( However, note that if there are more than 50 spaces, only the 1st 50 spaces will be shown in the dropdown)
      • If we search for another string that is part of a normal space (non personal), and that is not part of any personal space, the "Select Space" shows the expected results:

      Workaround

      There is no general workaround for this type of issue, as it depends on the name of the spaces that you need to look for:

      • Suggestion 1
        • If Confluence contains less than 50 spaces total, the workaround consists in not searching for any string in the Link Space section. In such case, all the Confluence spaces will be listed there, and you can select the one of your choice
      • Suggestion 2
        • This workaround consists in searching for another string that is part of the space you are looking for, but at the same time that is not part of any Confluence personal space. You might also simply search for the exact match of the space name
      • Suggestion 3
        • If the suggestion 2 does not help (because the space name is very short like "MAX", and this string is also part of the personal space of a user like "Maxime", then the only workaround is to rename the space in Confluence to a different name like "MAXIMUM" for example, that does not match the name of any Confluence personal space

        1. SearchForOtherString.png
          SearchForOtherString.png
          97 kB
        2. SearchForNoString.png
          SearchForNoString.png
          103 kB
        3. NoResult.png
          NoResult.png
          117 kB

              Unassigned Unassigned
              jrey Julien Rey
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: