Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-25992

On Confluence, Jira Issues Macro does not work with some custom fields after upgrading to JIRA 4.4.x - "Unable to determine if sort should be enabled"

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      After upgrading JIRA to 4.4.x the JIRA issues Macro does not work as expected if you set some custom fields as columns. It occurs either using the old one or the new syntax. The following error message is logged on Confluence side:

      2011-10-16 14:08:00,541 ERROR [http-18050-14] [confluence.extra.jira.JiraIssuesManager] getChannelElement Error while trying to assemble the issues returned in XML format: Error on line 111: The entity name must immediately follow the '&' in the entity reference.
       -- url: /test/PD/1.11+Release+Notes | page: 11123123 | userName: testuser | referer: https://testinstance.com
      2011-10-16 14:08:00,544 ERROR [http-18050-14] [confluence.extra.jira.JiraIssuesMacro] throwMacroException java.io.IOException: Error on line 320: The entity name must immediately follow the '&' in the entity reference.

      It occurs because there are some custom field options containing the character '&' in the results. Confluence faces the '&' it expects an entity reference on the sequence, but this is just the name of an option of the custom field.

      The proposed resolution is to make Confluence able to automatically escape this char from the XML file or improve the error message on both sides.

      Workaround

      There currently isn't much to do other than make sure that Jira does not send to Confluence any issues containing the '&' symbol, and this means you will need to:

      • Or replace the & symbol by what it usually means, the word 'and', which is the preferred workaround
      • Or add some validation to the Jira Query Language so as not to include issues containing the & symbol at all. Jira does not allow searching for issues not containing a text, so the workaround from this article could be used instead by:
        1. Searching for text ~ '&' and saving this as a filter named like ampersand-symbol
        2. Adding this to the JQL already in place, like this:
          AND filter != ampersand-symbol
          

          This would exclude issues containing the '&' symbol from what Jira sends to Confluence and will fix the issue in Confluence side. The problem with this second approach is that some Jira issues will not be presented in Confluence side.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lnunes Leandro Fanese Nunes [Atlassian]
              Votes:
              28 Vote for this issue
              Watchers:
              41 Start watching this issue

              Dates

                Created:
                Updated: