Swizzle Plugin

Last modified by Thomas Mortagne on 2021/03/17 21:13

cogAllows to query a JIRA instance and display all sort of information in a XWiki page about it
Developed by

XWiki Development Team

0 Votes
LicenseGNU Lesser General Public License 2.1


This plugin is being phased out for 3 reasons:

  • It's using the old Plugin technology (there's now a better way to write extensions in XWiki using Components)
  • The Swizzle project has been dormant/dead for several years now
  • JIRA has started offering a new REST API and there's a Java API to make it easy to use it.

As a consequence we now recommend using the XWiki JIRA Module. However note that the JIRA REST API is still young and doesn't yet offer all the possibilities of the older XMLRPC/SOAP API used by Swizzle.


Activate the plugin by editing your WEB-INF/xwiki.cfg file as follows and restart your XWiki instance:


You'll also need to add the Swizzle JIRA JAR to your WEB-INF/lib directory.


To use the plugin in your wiki, you'll need to write some Velocity code to integrate it where you want to use it, as shown below.

You can use any method from the Swizzle JIRA API.


Display a list of issues based on a JIRA RSS URL

Example using XWiki 2.0 syntax:

#macro (jira $pid $fixfor)
#set ($jirarss = $xwiki.swizzle.getJiraRss("https://jira.xwiki.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?&pid=${pid}&fixfor=${fixfor}&sorter/field=issuekey&sorter/order=DESC&tempMax=1000"))
#foreach ($issue in $jirarss.getIssues())

#jira("10010" "10435")

Note that in this example we've created a Velocity Macro too that can be reused to easily create reports.

Displays a list of JIRA issues based on a JQL Query

#macro (jira $jqlQuery)
#set ($jirarss = $xwiki.swizzle.getJiraRss("https://jira.xwiki.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=$escapetool.url($jqlQuery)"))
#foreach ($issue in $jirarss.getIssues())

#jira("project='XWiki' AND fixVersion='2.4 RC1'")

Displays a list of JIRA projects

#set ($jira = $xwiki.swizzle.getJira("https://jira.xwiki.org/rpc/xmlrpc"))
$jira.login("username", "password")

ID | Key | Project Name | Project Lead | Project URL
#foreach ($project in $jira.getProjects())
$project.getId() | $project.getKey() | $project.getName() | $project.getLead() | $project.getProjectUrl()





You can sort using:

  • sort("fieldname")
  • ascending("fieldname")
  • descending("fieldname")

For example to sort based on the issue creation date and in descending order:

#foreach ($issue in $jirarss.issues.descending("created"))

Prerequisites & Installation Instructions

Follow these steps:

  • Add the JAR in your container classpath (WEB-INF/lib)
  • Edit xwiki.cfg and add the following line to the list of plugins :
           ... ,\
         <plugin package>
  • Restart your container
  • Verify the plugin is properly installed by typing the following in a wiki page :
    $xwiki.<plugin name>.name

    If the installation has been successful, you will see <plugin name>.

Release Notes


All releases can be found in our Maven Repository


See https://jira.xwiki.org/secure/ReleaseNote.jspa?projectId=10303&styleName=Html&version=10519

Get Connected