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

Search for customers and organizations in SQL Server returns error 500

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 4.7.0
    • Customer Organisation

    Description

      Issue Summary

      When a user search for customers and organizations, the browser returns error 500. This behavior occurs only under the following circumstances (highlighted below)

      Environment (Specific to)

      • Jira Service Desk connected to Microsoft SQL Server
      • There are more than 2100 organizations in the Jira Service Desk project
      • Customer permissions for 'Who can raise requests?' is set to Customers who are added to the project

      Steps to Reproduce

      1. Setup a Jira Service Desk instance connected to Microsoft SQL Server
      2. Configure the Jira Service Desk project with a large number of organization. In this example, we have 8000 organizations
        You may use POST /rest/servicedeskapi/organization REST API to create organization and then POST /rest/servicedeskapi/servicedesk/{serviceDeskId}/organization to add the organization to the project
      3. Run a full re-index to ensure indexes are in sync
      4. Navigate to the Jira Service Desk project 'Customer' page
      5. Search for customers and organizations with any string

      Expected Results

      Search results returned correctly.

      Actual Results

      The search failed with a pop-up error.

      The below exception is thrown in the atlassian-jira-http-dump.log file:

      127.0.0.1 i000x000000x0 admin [26/May/2020:16:32:59 +0200] "GET http://localhost:8870/jira870/rest/servicedesk/1/pages/people/customers/pagination/JSD/search HTTP/1.1" - - - "http://localhost:8870/jira870/projects/JSD/customers" 
      
      127.0.0.1 o000x000000x0 admin [26/May/2020:16:32:59 +0200] "GET http://localhost:8870/jira870/rest/servicedesk/1/pages/people/customers/pagination/JSD/search HTTP/1.1" 500 26716 0,0790 "http://localhost:8870/jira870/projects/JSD/customers" 
              ___ Request _____________________________________________________
              
              ...
      
              ___ Response ____________________________________________________
              Response HTTP Headers : 
                  X-AUSERNAME=admin
                  Content-Type=application/json
                  Cache-Control=no-cache, no-store, no-transform
              Response Data (first 24576 of 26716 bytes) : 
          
          "Caught SQLServerException for select \"AO_54307E_ORGANIZATION_MEMBER\".\"USER_KEY\" from \"jiraschema\".\"AO_54307E_ORGANIZATION_MEMBER\" \"AO_54307E_ORGANIZATION_MEMBER\" inner join \"jiraschema\".\"AO_54307E_ORGANIZATION\" \"AO_54307E_ORGANIZATION\" on \"AO_54307E_ORGANIZATION\".\"ID\" \u003d \"AO_54307E_ORGANIZATION_MEMBER\".\"ORGANIZATION_ID\" where \"AO_54307E_ORGANIZATION\".\"ID\" in (?, ..., ?) or (\"AO_54307E_ORGANIZATION\".\"ID\" in (?, ..., ?)) or (\"AO_54307E_ORGANIZATION\".\"ID\" in (?, ..., ?)) or (\"AO_54307E_ORGANIZATION\".\"ID\" in (?, ..., ?)) or (\"AO_54307E_ORGANIZATION\".\"ID\" in (?, ..., ?)) or (\"AO_54307E_ORGANIZATION\".\"ID\" in (?, ..., ?)) or (\"AO_54307E_ORGANIZATION\".\"ID\" in (?, ..., ?)) or (\"AO_54307E_ORGANIZATION\".\"ID\" in (?, ..., ?
      

      Workaround

      Option 1
      Enable the sd.use.search.by.permissions.disabled dark feature, by following the steps below:

      • Navigate to following address: http(s)://<jira_base_url>/secure/SiteDarkFeatures!default.jspa
      • Add the following flag and Enable:
        sd.use.search.by.permissions.disabled
        

      Option 2
      Switch to the following options for the 'Who can raise requests?' customer permissions

      • Customers who have an account on this Jira site
      • Anyone can email the service desk or raise a request in the portal

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cchan Chung Park Chan
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:

                Backbone Issue Sync