Community moderators have prevented the ability to post new answers.
If you are unsure what parameters and Object
's are in the Velocity context, the links below may help:
For developers, who want to know more, the DefaultVelocityManager
creates a self-reference back to the VelocityContext
with these lines:
protected VelocityContext createVelocityContext(Map params) { if (params != null) { params.put("ctx", params); } ...
Therefore, doing this in the template will display the available parameters:
#foreach($p in $ctx.keySet().toArray()) $p.toString() - $ctx.get($p).getClass().getName().toString() #end
e.g.
textutils - com.opensymphony.util.TextUtils dateformatter - com.atlassian.jira.web.util.OutlookDate stringUtils - org.apache.commons.lang.StringUtils formatter - java.text.SimpleDateFormat constantsManager - com.atlassian.jira.config.DefaultConstantsManager buildutils - com.atlassian.jira.util.BuildUtils i - java.lang.Integer context - com.atlassian.jira.mail.TemplateContext jiraUserUtils - com.atlassian.jira.util.JiraUserUtils baseurl - java.lang.String security - $ctx.get($p).getClass().getName().toString() numdashes - java.lang.Integer ctx - java.util.HashMap jirakeyutils - com.atlassian.jira.util.JiraKeyUtils i18n - com.atlassian.jira.web.bean.I18nBean recipient - com.opensymphony.user.User velocityCount - java.lang.Integer attachments - java.util.ArrayList remoteUser - com.opensymphony.user.User userutils - com.atlassian.core.user.UserUtils applicationProperties - com.atlassian.jira.config.properties.ApplicationPropertiesImpl padSize - java.lang.Integer customFieldManager - com.atlassian.jira.issue.managers.DefaultCustomFieldManager issue - com.atlassian.jira.mail.TemplateIssue jirautils - com.atlassian.jira.util.JiraUtils params - java.util.HashMap projectManager - com.atlassian.jira.project.CachingProjectManager velocityhelper - com.atlassian.jira.util.JiraVelocityHelper timeSpentFieldId - java.lang.String
Helpful info. Thank you Andrew!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here are the new links to the documentation
https://developer.atlassian.com/server/jira/platform/jira-templates-and-jsps/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.