JIRA 4.0 : Jelly Examples
This page last changed on Jun 14, 2009 by rosie@atlassian.com.
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. Retrieving a list of all usersJelly 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> Retrieving all users from a groupLike 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> Timeout an email to a new state with auto-response |
![]() |
Document generated by Confluence on Oct 06, 2009 00:31 |