-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
JIRA Development Cookbook
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 includes user, req, baseurl, and so on. The full list and the details of these variables can be found at http://confluence.atlassian.com/display/JIRADEV/Web+Fragments#WebFragments-VelocityContext.
In this recipe, we will see how to add more variables to the velocity context with the use of the context-provider element.
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 provider:
Create the new ContextProvider class.
The class must implement com.atlassian.plugin.web.ContextProvider. To make things easy, it is enough to extend the AbstractJiraContextProvider class and override the following...
Change the font size
Change margin width
Change background colour