The search on the Service Management Help Center does not return any knowledge page article

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

 
     

Summary

When searching for knowledge base articles from the Help Center page (Service Management home page /servicedesk/customer/portals), no articles are found:

However, when searching for knowledge articles from a specific Service Management Portal (/servicedesk/customer/portal/<PORTAL_ID), articles are found:

Environment

Any Jira Service Management version 3.x and 4.x with an application link to any Confluence version.

Cause

Root cause 1

A high number of Jira Service Management (JSM) projects are configured with a knowledge base space, and we are hitting the Confluence bug  CONFSERVER-33174 - Getting issue details... STATUS

When a customer searches for a key word from the Customer Portal homepage (Help Center), JSM sends an API call to Confluence using the end point knowledge-base/1.0/search using the following query (AA, BB, CC, DD... being the Confluence space keys linked to the JSM projects):

queryString=(keyword)+AND+(spacekey:"AA"+OR+spacekey:"BB"+OR+spacekey:"CC"+OR+spacekey:"DD"...)


If there is a too high number of JSM projects, the query received by Confluence will exceed the character limit that Confluence can handle (256 characters), as per the Confluence Bug. In such case, the search will be dropped by Confluence, and no article will be shown on the JSM Customer Portal.


Root cause 2

The Jira application is configured with 2 or more application links, each pointing to a different Confluence instance, and we are hitting a limitation described in the JSM feature request  JSDSERVER-8513 - Getting issue details... STATUS

In such case, when a customer searches for a key word from the Customer Portal homepage (Help Center), JSM will only search for this word on the Confluence instance set as primary in Jira > ⚙ > Applications > Application Links. If the relevant articles are located in the Confluence instance not set as primary, then no article will be found and no results will be returned on the Customer Portal.

Diagnosis

For Root cause 1

  • Replicate the issue after enabling the debugging package org.apache.http with the DEBUG level in Jira > ⚙ > System > Logging an Profiling
  • Check the Jira logs after the issue was replicated and look for the query sent from the Jira application to the Confluence application, which should look like the one below:

    2021-04-30 10:17:53,671+0300 http-nio-8080-exec-9 DEBUG jirauser XXXxXXXXXXXxXX xxxxxx xxx.xx.x.xxx,0:0:0:0:0:0:0:1 /rest/servicedesk/knowledgebase/latest/articles/shared/search [o.a.h.impl.execchain.MainClientExec] Executing request GET /rest/knowledge-base/1.0/search?type=page&queryString=%28laptop%29+AND+%28spacekey%3A%22AA%22+OR+spacekey%3A%22BB%22+OR+spacekey%3A%22CC%22+OR+spacekey%3A%22DD%22+OR+ ... %22%29&pageSize=3&startIndex=0&highlight=true&xoauth_requestor_id=jirauser HTTP/1.1
  • If you decode the URL of the request sent from Jira to Confluence using https://www.urldecoder.org/, you should see that the querystring parameter from that URL looks like this:

    queryString=(keyword)+AND+(spacekey:"AA"+OR+spacekey:"BB"+OR+spacekey:"CC"+OR+spacekey:"DD"...)
  • Check the size of the entire string. If it exceeds 256 characters, then this root cause is relevant


For Root cause 2

  • In Jira, go to ⚙ > Applications > Application Links, and check if there are at least 2 Confluence application links
  • If there are at least 2, check which Confluence instance is set as primary. If the Confluence instance that contains the knowledge base articles is not set as primary, then this root cause is relevant 

Solution

For Root cause 1

  • Due to the nature of the Confluence bug (the limit of 256 characters can't be changed), the only way to workaround the issue is to configure fewer JSM projects with a knowledge base space.

For Root cause 2

  • Set the Confluence instance that contains the knowledge base article as primary in Jira > ⚙ > Applications > Application Links
  • (warning) Note that this workaround will only work if you are only using 1 single Confluence instance as a knowledge base resource. If you are using multiple Confluence instances for knowledge space purpose, there is unfortunately no workaround.



Last modified on Aug 24, 2021

Was this helpful?

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