-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
JIRA Development Cookbook
When new operations are created, it is often a requirement to hide them or show them, based on the permissions or state of the issue or something else. JIRA allows conditions to be added while defining the web items, and when the conditions are not satisfied, the web item won't show up!
In this recipe, we will lock down the new issue operation we created in the previous recipe to Project Administrators exclusively.
Create the Manage Project issue operation, as explained in the previous recipe.
Following are the steps to add a new condition to an issue operation's web item:
Create the condition class. The class should implement the com.atlassian.plugin.web.Condition interface, but it is recommended to extend com.atlassian.jira.plugin.webfragment.conditions.AbstractIssueCondition when creating an issue condition.
While extending AbstractIssueCondition, we will have to implement the shouldDisplay method, as shown here:
public class AdminCondition...
Change the font size
Change margin width
Change background colour