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

Opened Request and Closed Request count is "0" in 'Customers' page when switching user profile to a non English language

    XMLWordPrintable

Details

    Description

      Issue Summary

      Open Request and Closed Request count is "0" in 'Customers' page when switching user profile to a non English language, and if the "Customer Request Type" field has been manually translated for that language.

      Note

      This bug was replicated in Jira 8.13.0 (Service Desk 4.13.0), but it might also impact older versions too (Jira 7.x / Service Desk 3.x).

      Steps to replicate

      • Install Jira 8.13.0 with Service Desk 4.13.0
      • Go to ⚙ > Issues > Custom Fields, and note that the Customer Request Type is "locked", which means that this field can't be translated
      • Follow the steps from the KB Unlock a locked Jira Software custom field to temporarily unlock the Customer Request Type field in the database
      • Go back to ⚙ > Issues > Custom Fields, and note that the Customer Request Type is no longer "locked"
      • Click on ⚙ > Translate next to this field, and add a German translation to it
      • Create a new Service Desk project
      • Create a new customer account in this project
      • Create a new Service Desk request in this project and make sure that the Customer Request Type field is set
      • Go to the Project > Customer List page, and observe that there is 1 opened request for the customer:
      • Now, change your own profile language to German
      • Go back to the Project > Customer List page

      Expected results

      We should see the right number of opened requests next to the customer name.

      Actual results

      The number of opened requests next to this customer is "0"

      Explanation of the bug

      To calculate the number of opened request for a specific customer, the following JQL query is executed in the backend:

       
      reporter = "<customer_user_name>" AND resolution = Unresolved AND project = <PROJECT_KEY> AND "Customer Request Type" is not EMPTY
      

      With the example above, we can see that this query will return 1 result (shown under "Opened Requests"):

      Because of the bug, if the "Customer Request Type" was manually translated to "bladibla" for example, then the following incorrect JQL query is executed instead (the translated version of this field name is replaced in the JQL query):

      reporter = "<customer_user_name>" AND resolution = Unresolved AND project = <PROJECT_KEY> AND "bladibla" is not EMPTY
      

      Since this field name is incorrect (the non translated field name should be used instead), no result is returned by this query.

      Workaround

      The workaround consists in deleting from the Database all the translations of the "Customer Request Type" field:

      • Go to ⚙ > Issues > Custom Fields, and click on ⚙ > View next to the "Customer Request Type" field
      • Note the custom field ID at the end of the URL (secure/admin/ConfigureCustomField!default.jspa?customFieldId=XXXXX)
      • Run the following query in the Database to confirm that there is a translation for this field and for the German lang:
        select * from propertyentry where property_key like 'jira.translation.custom.fieldcustomfield%'
        
        • You should see a row that includes the custom field ID XXXXX and the corresponding locale (for example, de_DE for German). Note the value from the id column. It will be needed for the DELETE query.
          96602,CustomField,10001,jira.translation.custom.fieldcustomfield_10001.name.de_DE,5
          
      • Backup your Jira Database, so that you can revert changes made to the DB if anything goes wrong
      • Run the following query to delete the :
        delete from propertyentry where id = '<id_found_in_the_previous_steps>';
        

      Attachments

        1. CorrectJQLQuery.png
          CorrectJQLQuery.png
          41 kB
        2. IssueNotReplicated.png
          IssueNotReplicated.png
          77 kB
        3. IssueReplicated.png
          IssueReplicated.png
          98 kB

        Issue Links

          Activity

            People

              esantos2 Elton Santos
              jrey Julien Rey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync