I have a search that appears fine in Jira, but when I use in the Jira Macro in Confluence 5.4, the Sub-Components column heading appears, but there is no data.

      https://jira.atlassian.com/browse/JRA-37782

        1. screenshot-1.png
          screenshot-1.png
          23 kB
        2. screenshot-2.png
          screenshot-2.png
          24 kB
        3. screenshot-3.png
          screenshot-3.png
          11 kB
        4. screenshot-4.png
          screenshot-4.png
          14 kB
        5. Jira create issue .png
          Jira create issue .png
          52 kB
        6. Jira Seach UI.png
          Jira Seach UI.png
          51 kB
        7. Confluence jira issue.png
          Confluence jira issue.png
          36 kB

            [CONFSERVER-33179] jira macro not displaying data

            Katherine Yabut made changes -
            Workflow Original: JAC Bug Workflow v3 [ 2882960 ] New: CONFSERVER Bug Workflow v4 [ 2991360 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2785209 ] New: JAC Bug Workflow v3 [ 2882960 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow [ 2733244 ] New: JAC Bug Workflow v2 [ 2785209 ]
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2398612 ] New: JAC Bug Workflow [ 2733244 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 [ 2296580 ] New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2398612 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2232233 ] New: Confluence Workflow - Public Facing - Restricted v5 [ 2296580 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2192048 ] New: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2232233 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 [ 1929197 ] New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2192048 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v3 [ 1729725 ] New: Confluence Workflow - Public Facing - Restricted v5 [ 1929197 ]

            Rusi Popov added a comment - - edited

            The fix is:

            The upgrade of JIRA should keep the changes to resolve the following problem by applying the fix below

            Problem

            When reporting JIRA issues through Confluence, the Confluence macro "JIRA Macro / Search" does not show the values of the standard fields that have multiple values, namely fixVersions, versions, components

            The reason is that the XSLT at Confluence side does expect 0 or 1 XML element named after the standard field, instead of several.

            Fix

            Instead of generating several XML elements, generate 1 XML element with several values in it:

            • Open ${atlassian-home}/atlassian-jira/WEB-INF/classes/templates/plugins/issueviews  directory
            • Copy the file single-xml.vm as  single-xml.org.vm (for backup)
            • Edit the file single-xml.vm
            • Find the fragment
              #if ($issue.affectedVersions && ($issueXmlViewFields.isFieldRequestedAndVisible('versions')))
                #foreach ($version in $issue.affectedVersions)
                  <version>#xmlEscape($version.name)</version>
                #end
              #end
              #if ($issue.fixVersions && ($issueXmlViewFields.isFieldRequestedAndVisible('fixVersions')))
                #foreach ($version in $issue.fixVersions)
                  <fixVersion>#xmlEscape($version.name)</fixVersion>
                #end
              #end
              #if ($issue.components && ($issueXmlViewFields.isFieldRequestedAndVisible('components')))
                 #foreach ($component in $issue.components)
                   <component>#xmlEscape($component.name)</component>
                 #end
              #end

             

            • Replace it with
              #if ($issue.affectedVersions && ($issueXmlViewFields.isFieldRequestedAndVisible('versions')))
                <version>
                  #foreach ($version in $issue.affectedVersions)#if ($issue.affectedVersions.indexOf($version)>0), #end #xmlEscape($version.name)#end    
                </version>
              #end
              #if ($issue.fixVersions && ($issueXmlViewFields.isFieldRequestedAndVisible('fixVersions')))
                <fixVersion>
                  #foreach ($version in $issue.fixVersions)#if ($issue.fixVersions.indexOf($version)>0), #end #xmlEscape($version.name)#end
                </fixVersion>
              #end
              #if ($issue.components && ($issueXmlViewFields.isFieldRequestedAndVisible('components')))
                <component>
                  #foreach ($component in $issue.components)#if ($issue.components.indexOf($component)>0), #end #xmlEscape($component.name)#end
                </component>
              #end

             

            • Save
            • Restart JIRA

            Please note that on JIRA upgrade this fix will be overwritten, so take care to apply the fix again.

            Rusi Popov added a comment - - edited The fix is: The upgrade of JIRA should keep the changes to resolve the following problem by applying the fix below Problem When reporting JIRA issues through Confluence, the Confluence macro "JIRA Macro / Search" does not show the values of the standard fields that have multiple values, namely fixVersions, versions, components The reason is that the XSLT at Confluence side does expect 0 or 1 XML element named after the standard field, instead of several. Fix Instead of generating several XML elements, generate 1 XML element with several values in it: Open ${atlassian-home}/atlassian-jira/WEB-INF/classes/templates/plugins/issueviews   directory Copy the file single-xml.vm as  single-xml.org .vm (for backup) Edit the file single-xml.vm Find the fragment #if ($issue.affectedVersions && ($issueXmlViewFields.isFieldRequestedAndVisible('versions')))   #foreach ($version in $issue.affectedVersions)     <version>#xmlEscape($version.name)</version>   #end #end #if ($issue.fixVersions && ($issueXmlViewFields.isFieldRequestedAndVisible('fixVersions')))   #foreach ($version in $issue.fixVersions)     <fixVersion>#xmlEscape($version.name)</fixVersion>   #end #end #if ($issue.components && ($issueXmlViewFields.isFieldRequestedAndVisible('components')))    #foreach ($component in $issue.components)      <component>#xmlEscape($component.name)</component>    #end #end   Replace it with #if ($issue.affectedVersions && ($issueXmlViewFields.isFieldRequestedAndVisible('versions')))   <version>     #foreach ($version in $issue.affectedVersions)#if ($issue.affectedVersions.indexOf($version)>0), #end #xmlEscape($version.name)#end       </version> #end #if ($issue.fixVersions && ($issueXmlViewFields.isFieldRequestedAndVisible('fixVersions')))   <fixVersion>     #foreach ($version in $issue.fixVersions)#if ($issue.fixVersions.indexOf($version)>0), #end #xmlEscape($version.name)#end   </fixVersion> #end #if ($issue.components && ($issueXmlViewFields.isFieldRequestedAndVisible('components')))   <component>     #foreach ($component in $issue.components)#if ($issue.components.indexOf($component)>0), #end #xmlEscape($component.name)#end   </component> #end   Save Restart JIRA Please note that on JIRA upgrade this fix will be overwritten, so take care to apply the fix again.

              kpham Khoa Pham
              55b0a8634538 Shelton Oliver
              Affected customers:
              1 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: