Creating new velocity context for web fragments
As we have mentioned in the previous recipes, it is possible to add velocity variables while constructing a JIRA web fragment. JIRA supports a list of variables by default, which include user
, req
, baseurl
, and so on. The full list and the details of these variables can be found at https://developer.atlassian.com/display/JIRADEV/Velocity+Contexts.
In this recipe, we will see how to add more variables to the velocity context with the use of the context-provider
element.
How to do it...
The context-provider
element adds to the velocity context available to the web section and web item modules. Only one context-provider
can be added for an item. The following steps show how we can make use of a context ...
Get JIRA Development Cookbook - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.