Chart macro - can it use JiraIssues macro results as source data somehow?

I'd like to use the chart macro to display some statistics regarding issues in Jira, but I can't figure out how I can get chart to access the resulting tickets of a Jira query.

I have been successful in getting chart to read data from an external page that contains a table as follows.

{include:Practice Sample CSV Data}

However, the only way I am aware of to pull Jira issues is to use the jiraissues macro, which does not appear to provide any output formatting options.

   AND component=QA_Tools
   AND status=Open

The above jiraissues code sample will display the results in a dynamic window, though I don't see any way I can format the output into something the chart macro would understand.

Is there a way to get the output of a Jira query to be used as the source data for a chart?

5 answers

try using "renderMode=static" in the jiraissues macro. It is to turn the Jira Issues table to render in a non-dynamic mode. I could get the components listed, in a bar chart using this inside a chart macro. It didn't display the data but i think i was not using the right query for this kind of chart.

Since I could see my components listed on the chart, I'm hopeful it can work.

This doesn't quite seem to work for me.

I tried the following wiki code...


   AND component=APPNAME
   AND fixversion="APPNAME-RB-2.0.0"
   | renderMode=static
   | columns=status;component;summary

...and what I end up seeing when it is rendered is something that looks a little like this...


0.000 -------------------------

       JIRA Issues (12 issues)
      [] status [] verified [] fixed


The "graph" part seems to be grabbing the header of the first column of data and then the values from the following rows in that column.

The rendered Jira issues (shown after the graph) looks something like this...

JIRA Issues (12 issues)
Status   | Component | Summary
Verified | APPNAME   | summary text 1
Fixed    | APPNAME   | summary text 2
Open     | APPNAME   | summary text 3

If there's a way to capture the Jira filter results into a normal table or .csv output, it looks like that would work much better...albeit, I haven't yet found a away to get info from the jiraissue macro in such a format yet - it seems kind of restrictive

You would think that Atlassian THEMSELVES would use this like mad! Dang it! I wish we had this. G.

I still have not figured out a way to accomplish this.

Still not resolved, but here's what I've tried so far...

Using the following syntax

   AND fixversion="things-RB-1.0.0" 
   | renderMode=static 
   | columns=status;component;summary 

The {jiraisues} macro results in a table with 2 header rows.

| JIRA Issues (45 issues)                     | 
| Status   | Component | Summary              | 
| Fixed    | app1      | fix thing 1          | 
| Fixed    | app1      | fix thing 2          |
| Verified | app2      | fix the whosiwhatsit |
| Resolved | app2      | fix the doohickey    |

The chart drawn based on this table shows

* "Stuff" as the vertical label

* "Things" as the horizontal label

* no data points

* a legend which shows a diff color for each of the following

* Status

* Fixed

* Verified

* Resolved

I would expect to see "Fixed", "Verified" and "Resolved" - but "Status" is actually a column heading in the table drawn out by the {jiraissues} macro.

It seems as if this might be a step closer to workable if there is some way to disable the top row of the table output by {jiraissues}

This is an old thread, but, as I wanted to do the same thing now in 2013, I'll post my answer in hopes it will help someone else. the only way I've found, short of writing a Jira Gadget to display what you want and importing it into Confluence, uses Bob Swift's XSLT macro. What I did:

Embed the XSLT macro inside a Chart macro. In the XSLT macro, point the source to the URL for the XML view of your Jira Filter or JQL query. I use an XSL file saved as an attachment in Confluence. Have the XSL output wiki format data. Here is a sample XSL file to create a table to display a summary of the statusses of the issues output from a filter:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:output method="text" />
<xsl:strip-space elements="*"/>

<xsl:template match="channel" >
    <!-- Write the headings  -->
    <xsl:apply-templates select="item">
        <xsl:sort select="status"/>

<xsl:template match="item" >
    <xsl:if test="not(preceding-sibling::item/status = current()/status)">
        <xsl:value-of select="status" />
        <xsl:value-of select="count(/*//item[status = current()/status])" />

Here's the output from the XSLT for a sample filter:

|In Progress|1|
|Not Started|4|

Unfortunately, the XSLT macro doesn't use Conflunce-Jira authenticated application links, so this only works with Jira views/queries that are accessible anonymously.

The XSLT macro is part of the HTML Plugin for Confluence

You can use Chart from Table macro from Table Filter and Charts add-on to build charts based on Jira Issue macro.

No you cannpt - three a bugs since 2016 and Atlassian doesn`t care about this

Chart macro doesn't work, but Chart from Table macro does. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

245 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you