Documentation for JIRA 4.2. Documentation for other versions of JIRA is available too.
The Issue Operations plugin module allows you to add new operations to the 'View Issue' screen.
Issue Operation plugin modules are available in JIRA 3.4 through to 4.0. They will be unavailable from 4.1 onwards — please use Web Items instead.
You can add new operations with a plugin, linking to information about a single issue (most likely pulled from an external source).
Here is an example descriptor that adds a link to Google a given issue's summary:
<!-- The module class should implement com.atlassian.jira.plugin.issueoperation.PluggableIssueOperation --> <issue-operation key="google-summary" name="Google this issue" class="com.atlassian.jira.plugin.issueoperation.DefaultPluggableIssueOperation"> <resource type="velocity" name="view"> <img src="$req.contextPath/images/icons/bullet_creme.gif" height=8 width=8 border=0 align=absmiddle> <b><a href="http://www.google.com/search?q=${issue.summary}">Google</a></b> issue summary </resource> <!-- the relative order of operations --> <order>10</order> </issue-operation>
Issue operations are very useful as a 'hook' to link to your other plugin components - such as Webwork actions, project tab panels, reports etc.
PluggableIssueOperation
.showOperation(Issue issue)
method allows you to turn show or hide operations for certain users, permissions etc.DefaultPluggableIssueOperation
is a useful base that should work for most simple HTML operations, for instance where only a changed .vm template is required. See for example the Canned Response issue operation plugin<resource type="velocity" name="view" location="templates/more-operations.vm"/>