Displaying dynamic notifications/warnings on issues
JIRA has an interesting feature, the Announcement Banner, which can be used to make announcements to its user community via JIRA itself. But sometimes, it isn't enough to satisfy all its users. Power users of JIRA sometimes want to see warnings or notifications while they are viewing an issue based on some attributes of the issue.
In this recipe, we will see how to add a warning or error message on an issue based on whether the issue has subtasks or not.
Getting ready
Create a skeleton plugin using the Atlassian Plugin SDK.
Here, as in the previous recipe, the core logic is in extending the JIRA action and modifying the existing JSP files.
In this recipe, we will be overriding the ViewIssue
action and the constructor for this action needs the PagerManager
class. Unfortunately, PagerManager
is not available for v2 plugins yet and hence we will have to write this as a v1 plugin.
How to do it...
The following are the steps to display warnings/errors...