Solution to link JSM Knowledge Base with Confluence DC


Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

When trying to link Confluence spaces in Jira Service Management (JSM) projects, search functionality in the "Link Space" dropdown fails to return results if there are too many spaces, often exceeding 50 entries.

Environment

  • Jira Service Management Cloud linked with Confluence (Data Center or Server) via App Tunnel and App Link.
  • Users trying to link Confluence spaces via Project Settings > Knowledge Base > Link Space in JSM.
  • Browser-based search attempts within the dropdown containing numerous spaces.

Diagnosis

  • Go to JSM Project > Project Settings > Knowledge Base.
  • Attempt to link a Confluence space through the "Link Space" option.
  • Type part of the space name into the dropdown search. No results are returned, despite spaces existing in Confluence.
  • Issue occurs particularly with customers having a large number of spaces (more than 50).

Cause

The dropdown functionality is limited, unable to process and return results when the number of spaces exceeds a certain threshold (e.g., 50 spaces). This limitation leads to the search failing, as only a subset of spaces is processed.

Solution

The steps below provide a workaround using browser developer tools and a manual API request:

Navigate to Project Settings

  • Go to JSM Project > Project Settings > Knowledge Base > Link Space.

Open Developer Tools in your Browser

  • Open Developer Tools (right-click and select "Inspect" or press F12).
  • Select any available test space from the dropdown.

Locate the API Call in Developer Tools

  • In Developer Tools, go to the Network tab and locate the API call to linked-spaces.
  • Right-click on the call and select "Copy as cURL".

Modify the cURL Request

  • Paste the cURL command into a text editor.
  • Modify the spaceName, spaceKey, and ensure isConfluenceServer is set to true for Confluence Data Center/Server (or false for Confluence Cloud).

Example of a modified cURL request:

curl 'https://atl-test-rhameed2.atlassian.net/gateway/api/jsd-apollo-stargate/sharded/workspace/3a0991bc-a776-421f-85f1-e53aac93ad34/api/project/10001/kb-settings/linked-spaces' \
  -H 'accept: application/json,text/javascript,*/*' \
  -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
  -H 'content-type: application/json' \
  -H 'cookie: ajs_anonymous_id=%22c93dcdbe-bbff-4433-8d7c-162310ffb737%22; marketplace-launch-darkly=%7B%22userKey%22%3A%227f721b5e-371e-4820-a04f-b8f4594a9d87%22%2C%22aaid%22%3A%2263da235ffb75f8568f5f6e38%22%7D; atlassian.xsrf.token=ff387e76620bc63a89ab52104c2d7fd5fd2ee6a3_lin; __awc_tld_test__=tld_test; __awc_tld_test__=tld_test; atlassian.account.xsrf.token=c8b6db98-e497-4a3e-bfe4-b3f7040c1bde; io=efiCNZwGsckG40G9AAGm; lastViewedForm-10001={%22templateFormId%22:1}; intercom-device-id-kkvkd7ql=86e6ba6b-d337-4835-a8da-4fbca2b98552; atl-bsc-consent-token-fallback=002111101000; cross.join.nudges.confluence.visited=true; intercom-session-kkvkd7ql=aVhBNUpyZHNUMlZ6MnJBSGljSDNhaG5Iak1HZ1JFN08wdlpTQlBFZXRjUFdHMXBidG5wQzR1aFVVSGVST2tndC0tMFZOUWY0VzN2eU1zckdXb2p0dWJmQT09--5Zjc1LTU2ZWI3ZmMwMGVmOCJ9.w64iN1OSCTrCQTFIdb5H_ea8wQmwzP1gZH_LkPxU68B6WlaLKfODXFyTets8AjyEhfYX5FZ43JPTCQJW9pQIv6HaFcCuIY7K8RfB6HYpkHGebDoNBu4I-7XfSWQCZJuCwIsPvykaEY0I9fTV7OpQRXbue3K1fYp6APsuhY4QAU_Suk_POKp3Ja2GZETS7LckJH2Za3ki-Lzuuse-otJzAV9-u2yAQlyPOr_LUjGOTivvKkhMhOaLBaj39WaHyTqc0v754DFmq0JcXECseQeQ1E9I_Ij-N8BS9L8fJzQLigBod_dOwdd6Y95gJGgN_6uvDoS9A6BvZ2DY1qUHxdw0tA; JSESSIONID=ZhHi4LNB0R8i-2bcpVXHpCc657XVRIxuysmp8AvY' \
  -H 'origin: https://atl-test-rhameed2.atlassian.net' \
  -H 'priority: u=1, i' \
  -H 'referer: https://atl-test-rhameed2.atlassian.net/jira/servicedesk/projects/SP/settings/confluence-kb' \
  -H 'sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' \
  --data-raw '{"applinkId":"fc10f89e-9bfd-32dd-a969-c490b6dae34d","isConfluenceServer":false,"spaceDetails":[{"spaceName":"Service project 2","spaceKey":"SP2"}]}' 

Execute the Command

  • Run the modified cURL command in your terminal.

Refresh the Webpage

  • Once completed, refresh the JSM webpage.
      • The selected Confluence space should now be linked successfully.


CAUTION

Please exercise caution when following the steps mentioned in this document. If you encounter any issues or have questions, it is highly recommended to get in touch with support before proceeding further.

Last modified on Dec 20, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.