Documentation for JIRA 4.1. Documentation for other versions of JIRA is available too. 
![]()
Jelly is a scripting and templating language from Apache's Jakarta project.
We use it within JIRA to import and manipulate data.
This page contains example scripts highlighting the more advanced capabilities of Jelly.
Jelly can actually create and invoke methods on Java objects. This script utilizes this to retrieve a list of all the users in JIRA:
<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib" xmlns:core="jelly:core">
<core:invokeStatic className="com.opensymphony.user.UserManager"method="getInstance" var="instance"/>
<core:invoke on="${instance}" method="getUsers" var="users"/>
<core:forEach var="user" items="${users}">
//do something with ${user}
</core:forEach>
</JiraJelly>
Like the above script, this script creates an instance of the UserManager. It then retrieves all the users from a group.
<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib" xmlns:j="jelly:core" xmlns:util="jelly:util">
<j:invokeStatic className="com.opensymphony.user.UserManager" method="getInstance" var="instance"/>
<j:invoke on="${instance}" method="getGroup" var="grp">
<j:arg type="java.lang.String" value="thegroupname"/>
</j:invoke>
<j:invoke on="${grp}" method="getUsers" var="users"/>
</JiraJelly>