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

Automation sent webhook in containing non-Latin characters, shows encoding Errors 'description' => '? ??? ????? ???????? ????????? ??? ????? ??????'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 4.1.0
    • 4.0.0
    • Automation

      Summary

      When Jira SD try send a webhook via Automation in Service Desk 4.0, the encoding of not Latin characters is broken in the Webhook body.
      All non Latin characters in the issue description or title fail to render in the webhook body.

      Environment

      • Jira 8.0.0 running Jira SD 4.0.0
      • Automation is configured to send webhooks.
      • Jira uses UTF8, issues have non Latin characters, eg: Cyrillic, Hebrew or Arabic

      Steps to Reproduce

      • Create a new generic automation rule that sends a webhook if a public comment is added on any issue.
      • Configure the webhook to be sent to a webhook test site, eg: https://webhooks.site.
      • Enable Debug logging on the package: org.apache.http

      Expected Results

      • Jira SD sends the webhook successfully with all the non Latin characters encoded correctly in the webhook body.

      Actual Results

      • Jira SD send the webhook but the non Latin characters are not encoded correctly, they display as question marks as below:
        JSON content look like
         'description' => '? ??? ????? ???????? ????????? ??? ????? ??????'
        

        headers are 

          'User-agent' => 'JIRA-Service-Desk-4.0.0 / Apache-HttpClient',
          'Accept' => 'application/json',
          'Content-type' => 'application/json',
        
      • The data is even not displaying correctly in the debug logs doesn't seem to be a network headers issue:
        2019-03-04 10:25:43,984 PsmqAsyncExecutors-then:thread-2 DEBUG user1 625x2013x1 1hfj2op 0:0:0:0:0:0:0:1 /rest/api/2/issue/10001/comment [o.apache.http.wire] http-outgoing-45 >> "{"issue":{"id":"10001","self":"http://localhost:1800/jira8
        00/rest/api/2/issue/10001","key":"BASITSD-2","fields":{"issuetype":{"self":"http://localhost:1800/jira800/rest/api/2/issuetype/10002","id":"10002","description":"For general IT problems and questions. ......................................................................{"self":"http://localhost:1800/jira800/rest/api/2/statuscategory/4","id":4,"key":"indeterminate","colorName":"yellow","name":"In Progress"}},"components":[],"timeoriginalestimate":null,"description":"?????? ?????? ???? ????? ??????\r\n\r\n[0xa0]\r\n\r\nPlease check this request.","timetracking":{},"attachment":[],"aggregatetimeestimate":null,"summary":"Help me please: ?????? ?????? ???? ????? ??????",................................................................................................
        

      Notes:

      • We try to send same webhook via Core (system webhooks config), all work fine. Trouble only is SD.
      • Tried to test the same on Jira 7.13.1 and couldn't reproduce the issue.
      • Jira SD 4.0.0 also didn't pick up my proxy settings, unlike what happened in Jira 7.13.1, looks like the Jira SD 4.0.0 is using different implementation now.

              esantos2 Elton Santos
              sabdelfattah Sherif Abdelfattah (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: