Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-43207

JIRA Macro couldn't render issues when the filter contains multi-byte characters

      Summary

      JIRA Macro couldn't render issues when the filter contains multi-byte characters.

      Environment

      • Confluence 5.10.1
      • JIRA 7.1.9

      Steps to Reproduce

      1. Install vanilla JIRA 7.1.9
      2. Create a project
      3. Create two issues as follows
        1. Create an issue with Japanese summary (The summary is "テスト".)
        2. Create another issue with English summary (The summary is "test".)
      4. Install vanilla Confluence 5.10.1 and integrate it with the JIRA
      5. Create a space and a page
      6. Use JIRA Macro with the following two types of filters
        1. summary ~ "テスト"
        2. summary ~ "test"
      7. Check if the macro works fine in the preview dialog

      Expected Results

      Even if we use Japanese characters in the filter, the issue should be rendered in the page as it works fine with the other filter which contains only English characters.

      Actual Results

      When we use Japanese characters in the filter, the issue wasn't rendered in the page correctly.

      Notes

      • We can use the filter (JQL) in JIRA to find the issue
      • The filter which contains Japanese characters also works fine in the macro preview dialog as I mentioned in the above image
      • You can reproduce this bug not only with Japanese characters but also Russian, Korean, Chinese characters (any muti-byte characters)
      • This bug *WASN'T seen on Confluence 5.9.12 with JIRA 7.1.9

      Workaround

      1. Stop Confluence
      2. Add the following line into the bin/setenv.sh file
        CATALINA_OPTS="-Dfile.encoding=UTF-8 ${CATALINA_OPTS}"
        
      3. Start Confluence

        1. CONF-43207.pem
          2 kB
        2. english_filter.png
          english_filter.png
          302 kB
        3. issues.png
          issues.png
          235 kB
        4. japanese_filter.png
          japanese_filter.png
          297 kB
        5. preview.png
          preview.png
          296 kB
        6. Screen Shot 2016-07-20 at 1.16.53 PM.png
          Screen Shot 2016-07-20 at 1.16.53 PM.png
          84 kB

            [CONFSERVER-43207] JIRA Macro couldn't render issues when the filter contains multi-byte characters

            Minh Tran added a comment -

            A fix for this issue is available to Server and Data Center customers in Confluence 7.3.2
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Minh Tran added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 7.3.2 Upgrade now or check out the Release Notes to see what other issues are resolved.

            Hey Philipp,

            thank you for your answer. It works now.

            Hoping, Atlassian will fix it soon

            Regards,

            Adrian

            Adrian_Weiss added a comment - Hey Philipp, thank you for your answer. It works now. Hoping, Atlassian will fix it soon Regards, Adrian

            Hi Adrian,

            although the .bat is indeed the correct file under Windows, it will completely be bypassed when you run Confluence as a Service.
            Hence, as you already assumed, you will need to add the parameter in the JVM-Settings of the service.
            Btw, it makes sense to add this for Jira too if you haven't already, as otherwise special characters in Confluence page names will be broken when displayed in Jira issues (i.e. when an issue is mentioned on a specific Confluence page).

            Regards,
            Philipp

            Philipp Sendek added a comment - Hi Adrian, although the .bat is indeed the correct file under Windows, it will completely be bypassed when you run Confluence as a Service. Hence, as you already assumed, you will need to add the parameter in the JVM-Settings of the service. Btw, it makes sense to add this for Jira too if you haven't already, as otherwise special characters in Confluence page names will be broken when displayed in Jira issues (i.e. when an issue is mentioned on a specific Confluence page). Regards, Philipp

            Hey there,

            I've managed to modify following files

            1. bin/setenv.sh  
              CATALINA_OPTS="-Dfile.encoding=UTF-8 ${CATALINA_OPTS}"
            1. bin/setenv.bat
              set CATALINA_OPTS=-Dfile.encoding=UTF-8 %CATALINA_OPTS%

            We are running on Windows Server (reason for editing bin/setenv.bat) and Jira is running as a service.

            The problem is still occuring: 

            http://domain/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+ITSD+AND+type+%3D+%22Neuanforderung%2F%C3%83%E2%80%9Enderung%22+AND+resolution+%3D+Unresolved+ORDER+BY+%22Punkte+Priorit%C3%83%C2%A4t%22+DESC%2C+status+DESC++&src=confmacro
            

            Do I need to modify the Service-JVM-Settings?

             

            Best regards

            Adrian

             

            Adrian_Weiss added a comment - Hey there, I've managed to modify following files bin/setenv.sh   CATALINA_OPTS= "-Dfile.encoding=UTF-8 ${CATALINA_OPTS}" bin/setenv.bat set CATALINA_OPTS=-Dfile.encoding=UTF-8 %CATALINA_OPTS% We are running on Windows Server (reason for editing bin/setenv.bat) and Jira is running as a service. The problem is still occuring:  http: //domain/secure/IssueNavigator.jspa?reset= true &jqlQuery=project+%3D+ITSD+AND+type+%3D+%22Neuanforderung%2F%C3%83%E2%80%9Enderung%22+AND+resolution+%3D+Unresolved+ORDER+BY+%22Punkte+Priorit%C3%83%C2%A4t%22+DESC%2C+status+DESC++&src=confmacro Do I need to modify the Service-JVM-Settings?   Best regards Adrian  

            Hi yourforest,

            Thanks for using Atlassian products and I'm sorry that you're affected by the problem.

            If your problem is actually caused by this bug, you should be able to solve it with the workaround written in the description.

            1. Stop Confluence
            2. Add the following line into the bin/setenv.sh file
              CATALINA_OPTS="-Dfile.encoding=UTF-8 ${CATALINA_OPTS}"
              
            3. Start Confluence

            Could you give it a shot please?

            Cheers,
            Yuki

            Yuki Okamoto (Inactive) added a comment - Hi yourforest , Thanks for using Atlassian products and I'm sorry that you're affected by the problem. If your problem is actually caused by this bug, you should be able to solve it with the workaround written in the description. Stop Confluence Add the following line into the bin/setenv.sh file CATALINA_OPTS= "-Dfile.encoding=UTF-8 ${CATALINA_OPTS}" Start Confluence Could you give it a shot please? Cheers, Yuki

            Jianchun Lu added a comment - - edited

            Hi ,We also met problem on Confluence 6.11.2 to Jira 7.12.1 

            Chinese charters cant be used in Jira issue Filter. 

            Is this a bug?

             

            Jianchun Lu added a comment - - edited Hi ,We also met problem on Confluence 6.11.2 to Jira 7.12.1  Chinese charters cant be used in Jira issue Filter.  Is this a bug?  

            Hello Mr. Tapper,

            nice to read you again.
            We never had this issue running on Jira 7.1.x and Confluence 5.9.x either.

            Since this issue started with our upgrade, we used the start up parameter described in the workaround section and it works like a charm.

            Using this parameter in Jira also fixes the issue there, that Umlauts in Confluence page names aren't properly displayed in "mentioned in"-hyperlinks within Jira issues.

            Regards,
            Philipp Sendek

            Philipp Sendek added a comment - Hello Mr. Tapper, nice to read you again. We never had this issue running on Jira 7.1.x and Confluence 5.9.x either. Since this issue started with our upgrade, we used the start up parameter described in the workaround section and it works like a charm. Using this parameter in Jira also fixes the issue there, that Umlauts in Confluence page names aren't properly displayed in "mentioned in"-hyperlinks within Jira issues. Regards, Philipp Sendek

            Entering jira issues macro in markup works for me

            e. g.

            {jiraissues:url=https://jira.atlassian.com/issues/?jql=text%20~%20%22%C3%A4%22}

            the confluence wiki markup editor (ctrl-shift-D) is useful for complex queries, see field description: https://confluence.atlassian.com/doc/jira-issues-macro-139380.html

            renderMode=dynamic may be required for multiple queries on the same page and seems to works only for Jira users whose language is set to English

            christoph Tapper added a comment - Entering jira issues macro in markup works for me e. g. {jiraissues:url=https: //jira.atlassian.com/issues/?jql=text%20~%20%22%C3%A4%22} the confluence wiki markup editor (ctrl-shift-D) is useful for complex queries, see field description: https://confluence.atlassian.com/doc/jira-issues-macro-139380.html renderMode=dynamic may be required for multiple queries on the same page and seems to works only for Jira users whose language is set to English

            We can confirm this bug in Confluence 6.9.3 and Jira 7.10.2 with the following JQL-query.

            issuetype = Frist AND status in ("Frist akut", "Frist überfällig") AND (Verantwortlicher = currentUser() OR Vertreter = currentUser()) ORDER BY Verantwortlicher ASC, due ASC 

            So for us, it's basically "just" Umlauts.

            Another workaround was to use 'Filter = "Filter_Name_or_ID"' in the JQL, but that obviously requires more settings to be made within Jira itself.

            Regards,
            Philipp Sendek

            Philipp Sendek added a comment - We can confirm this bug in Confluence 6.9.3 and Jira 7.10.2 with the following JQL-query. issuetype = Frist AND status in ( "Frist akut" , "Frist überfällig" ) AND (Verantwortlicher = currentUser() OR Vertreter = currentUser()) ORDER BY Verantwortlicher ASC, due ASC So for us, it's basically "just" Umlauts. Another workaround was to use 'Filter = "Filter_Name_or_ID"' in the JQL, but that obviously requires more settings to be made within Jira itself. Regards, Philipp Sendek

            Hi Atalssian

            We in the Danish Ministry of Education - also have the mistake - and will encourage it to be corrected.

            Sincerely

            Morten Bjerregaard

            Morten Bjerregaard added a comment - Hi Atalssian We in the Danish Ministry of Education - also have the mistake - and will encourage it to be corrected. Sincerely Morten Bjerregaard

              qpham@atlassian.com Quan Pham
              yokamoto Yuki Okamoto (Inactive)
              Affected customers:
              40 This affects my team
              Watchers:
              46 Start watching this issue

                Created:
                Updated:
                Resolved: