This page last changed on Dec 02, 2008 by smaddox.

JIRA is the issue tracking and project management system supplied by Atlassian. The Jira Issues macro allows you to display a list of issues from a JIRA site within a page in Confluence.

In other words, if you have your own JIRA site, your Confluence page can show a list of issues from your JIRA project. You can also show a list of issues from any JIRA site to which you and your readers have access.

Screenshot: Example of JIRA Issues shown on a Confluence page



On this page:

Error formatting macro: toc: java.lang.NullPointerException

Usage

The basic syntax is:

{jiraissues:url=<URL of your JIRA XML view>}

Displaying a List of JIRA Issues on a Confluence Page

Step 1 — Obtain the URL of the Issue Filter

  1. Log in to your JIRA system.
  2. Go to the 'Find Issues' screen and create a new filter. Do not modify an existing filter.
  3. Set up your search parameters and use 'View' to check the issues returned.
  4. Once the filter is finished, go to the 'Filter View' tab located above and to the left of the 'View' button.
  5. From the 'Filter View' tab, locate the 'Current View' links section (see example below) and find the 'XML' link.
  6. Copy the 'XML' link to your clipboard.

Step 2 — Embed the Issue Filter URL onto your Confluence Page

  1. Log in to your Confluence system.
  2. Edit the page where you wish to display the list of JIRA issues.
  3. Type the following text into a new line at the appropriate location:
    {jiraissues:url=CONTENT}
    
  4. Replace 'CONTENT' with the JIRA filter URL from your clipboard.
  5. Customise the macro output by adding optional parameters. See below.
  6. Save the Confluence page.

Parameters

The JIRA Issues macro allows the following parameters:

Parameter Required Default Description
anonymous no false If this parameter is set to 'true', JIRA will return only the issues which allow unrestricted viewing i.e. the issues which are visible to anonymous viewers, as determined by JIRA's viewing restrictions. If this parameter is omitted or set to 'false', then the results depend on how your administrator has configured the communication between JIRA and Confluence. By default, Confluence will show only the JIRA issues which the user is authorised to view. See more details below.
baseurl no The value of the 'url' parameter If you specify a 'baseurl', then the link in the header, pointing to your JIRA site, will use this base URL instead of the value of the 'url' parameter. This is useful when Confluence connects to JIRA with a different URL from the one used by other users.
columns no By default, the following columns are shown:
  • type
  • key
  • summary
  • assignee
  • reporter
  • priority
  • status
  • resolution
  • created
  • updated
  • due
A list of JIRA column names, separated by semi-colons (;). Example columns are: key, summary, type, created, updated, due, assignee, reporter, priority, status and resolution. You can include any columns recognised by your JIRA site, including custom columns.
count no false If this parameter is set to 'true', the issue list will show the number of issues in JIRA. The count will be linked to your JIRA site.
cache no on The macro maintains a cache of the issues which result from the JIRA query. If the 'cache' parameter is set to 'off', the relevant part of the cache is cleared each time the macro is reloaded. (The value 'false' also works and has the same effect as 'off'.)
height no 480 The height in pixels of the table displaying the JIRA issues.
Note that this height specification is ignored in the following situations:
  • If you set the 'renderMode' parameter (see below) to 'static'.
  • When the JIRA issues are displayed in a PDF or Word document, in an email message or in an RSS feed.
renderMode no In formats not mentioned below, the default is 'dynamic'.
The default is 'static' when the JIRA issues are displayed in a PDF or Word document, in an email message or in an RSS feed.
By default, the JIRA Issues macro offers a dynamic display with the following features:
  • Click the column headers to sort the output.
  • Drag and drop the columns into a different order.
  • Temporarily remove a column from the display.
  • View a page of issues at a time, for faster response times.
    Set the 'renderMode' parameter to 'static' if you want to disable the dynamic display features.
url yes none The URL of the XML view of your selected issues in JIRA Issue Navigator.
Note: If the URL in the 'url' parameter does not contain a tempMax argument, then the value of tempMax will default to 500. If your JIRA server is version 3.12 or earlier, this means that the JIRA Issues macro will return a maximum of 500 issues. If your JIRA server is version 3.13 or later, a value of 500 means that the JIRA Issues macro will return a maximum of 500 issues per page.

Issues Displayed a Page at a Time

If you are using JIRA 3.13 or later, the JIRA Issues macro will retrieve and show a 'page' of issues at a time. The buttons underneath the table allow you to move to the next or previous page, or to the start or end of the list. The number of issues retrieved per page is determined by the url parameter — see the description of the macro parameters above.

If your version of JIRA is 3.12 or earlier, the JIRA Issues macro will retrieve all the issues at once and display them as a single 'page'.

Example

Below is an example of some macro markup code, requesting a list of issues from the Atlassian public JIRA site:

{jiraissues:anonymous=true|url=http://jira.atlassian.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?&query=jiraissues&summary=true&description=true&body=true&pid=10470&tempMax=10|columns=type;key;summary}

The example code contains three parameters:

  • anonymous=true
  • url=<a long URL derived from the XML view of a JIRA filter>
  • columns=type;key;summary

Below are the results of the above macro markup, displayed on this Confluence page:

Jira Issues
Type Key Summary
Bug CONF-1181 Parse exception in jiraissues
Bug CONF-2746 jiraissues macro flaky
Bug CONF-4472 jiraissues macro is broken in Preview mode
New Feature CONF-3729 robust (and safer) {jiraissues} macro authentication
Bug CONF-6878 jiraissue macro not including desired columns
Bug CONF-1415 jiraissues macro custom icons break
Bug CONF-854 ParseException when trying to use rss / jiraissues macro
Bug CONF-11829 jiraissues macro issues when multiple on page
Bug CONF-7322 Jiraissues macro doesn't show icons or timestamps
New Feature CONF-2711 Better authentication method for jiraissues and jiraportlet macros

Displaying Issues which have Restricted Viewing

Maybe your JIRA instance is not visible to anonymous visitors — everyone has to log in before they can see JIRA issues. Or maybe some of the JIRA issues are restricted to viewing by certain users only. This section explains how to handle JIRA issues that have restricted viewing.

Using Confluence-to-JIRA Trusted Communication (Recommended)

For Confluence 2.7.0 and later and JIRA 3.12 and later, your administrator can set up trusted communication between Confluence and JIRA. The entire process is described in the Confluence Administrator's Guide. Provided that your administrator has set up trusted communication, you don't need to add any extra parameters. Confluence and JIRA will work out the security between them, ensuring that the user will see only the issues they are authorised to see. Read the section below if you want more detail.

Remove the username and password from your macro markup code

Prior to Confluence 2.7, you needed to include a username and password in the macro markup code if you wanted to display JIRA issues which had restricted viewing. Once your administrator has set up trusted communication between Confluence and JIRA, you no longer need to include a username and password in the markup code for your JIRA macros.

The following options are available for determining the issues which will be retrieved from JIRA and displayed on the Confluence page:

What you want to do Macro parameter URL parameter Comments
Display the JIRA issues which the logged-in user is authorised to see. And if the user is not logged in, display only issues which allow unrestricted viewing.     Do not specify any authentication parameters. In this case, the behaviour depends on the way your administrator has set up trusted communication between JIRA and Confluence. Here is a summary of the behaviour:
  • If trusted communication is enabled, the authorisation will work seamlessly. When a logged-in user views your page, they will see only the JIRA issues they are allowed to see. And if they are not logged in, they will see only the issues which allow unrestricted viewing.
  • If trusted communication is disabled, the Confluence page will show only the JIRA issues which allow unrestricted viewing.
Ensure that Confluence will display only the JIRA issues which allow unrestricted viewing. anonymous   Regardless of who the user is (logged in or not), the Confluence page will show only anonymously-visible issues. Confluence will not attempt to set up a trusted communication link with JIRA in this case.
Use a pre-determined username and password to access the JIRA issues.   &os_username=MYNAME&os_password=MYPASSWORD Not recommended. Prior to Confluence 2.7, this was the only way of displaying issues with restricted viewing. For Confluence 2.7 and later, this method will still work. Confluence will not attempt to set up a trusted communication link with JIRA in this case.
Specifying Username and Password in the JIRA URL (Not Recommended)

If you have not set up trusted communication between JIRA and Confluence and if your JIRA issues have restricted viewing (i.e. JIRA requires a login before allowing access to the issues), then you need to type a JIRA username and password into the macro markup code and save it onto the Confluence page.

Append the following parameters to the end of the search URL:

&os_username=MYNAME&os_password=MYPASSWORD

where MYNAME is a JIRA username and MYPASSWORD is the corresponding password for that username. This username and password should not include an ampersand (&) symbol.

Troubleshooting

HTTPS

The JIRA Issues macro can access a JIRA instance running under SSL as long as the Confluence server is set to accept the JIRA SSL certificate.

JIRA 3.7 Link Format Change

As a result of RSS feed improvements, the (outdated) JIRA Issues Macro differs between JIRA 3.6 and 3.7.

This is not a concern for users running the latest versions of Confluence and JIRA. However, users using Confluence versions older than 2.2.10 to access JIRA 3.7 must upgrade Confluence or patch the JIRA Issues macro to handle the 3.7 format.

Confluence JIRA OK Action Required
2.2.10, 2.3 Any version None
Older than 2.2.10 3.7 Stop Confluence, open your Confluence install directory and remove the file \WEB-INF\lib\jira3.jar. Download the JIRA 3.7 version and rename it to jira3.jar
Older than 2.2.10 Older than 3.7 None

And see also:

RELATED TOPICS

JIRA Portlet Macro
Working with Macros

In the Administrator's Guide:

Take me back to Confluence User Guide


Document generated by Confluence on Dec 03, 2008 15:16