How to make a simple webwork action class?


I’m trying to make a custom dialog that opens on a webitem click.

This is the relevant part in my atlassian-plugin.xml:

	<web-resource key="issue-dialog-resources" name="DataGalaxy Issue Dialog Resources">
		<resource type="download" name="issue_dialog.js" location="/js/issue_dialog.js" />

	<webwork1 key="dg-issue-button-action" name="Link DG Objects" class="java.lang.Object">
			<action name="" alias="LinkObjects">
				<view name="input">/templates/issue_dialog.vm</view>

	<web-section key="dg-issue-button-section" location="opsbar-operations" weight="900">
		<label key="datagalaxy.issue.section.label" />

	<web-item key="dg-issue-button" section="dg-issue-button-section" weight="10">
		<label key="datagalaxy.issue.button.label" />
		<tooltip key="datagalaxy.issue.button.tooltip" />
		<link linkId="dg-issue-dialog-link">/secure/LinkObjects!default.jspa?id=${}</link>

And there is my action class:


import com.atlassian.jira.web.action.issue.AbstractIssueSelectAction;

public class LinkObjects extends AbstractIssueSelectAction
	public LinkObjects()

However, this is what maven tells me:

[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] /home/bazin_q/rendu/Work/DataGalaxy/src/main/java/com/datagalaxy/app/webwork/[5,43] cannot find symbol
  symbol:   class AbstractIssueSelectAction
  location: package com.atlassian.jira.web.action.issue
[ERROR] /home/bazin_q/rendu/Work/DataGalaxy/src/main/java/com/datagalaxy/app/webwork/[11,34] cannot find symbol
  symbol: class AbstractIssueSelectAction
[INFO] 2 errors

I don’t really understand this error since this class is used everywhere, so I checked into jira-api.jar:


As expected, there isn’t a class named “AbstractIssueSelectAction”.

Is the documentation deprecated?
Could you please give me an example on how to make a simple webwork action class?

Thanks in advance,
Quentin Bazin

For a simple Jira webwork action you should extend JiraWebActionSupport.
This class extends webwork.action.ActionSupport with a lot of Jira specific functionality.

Could you point to the documentation using AbstractIssueSelectAction?
Let me know if it helps,
Best regards

Hello @tjoy,

Thanks for your quick answer.

It works with JiraWebActionSupport, but how am I supposed to access the current issue then?
I’m a bit lost and the documentation doesn’t make things easier.

I found AbstractIssueSelectionAction here:

It seemed deprecated but this the only resource I found about displaying a dialog in Jira, and I got there from this page:

Thanks in advance

I’m not sure what you’re trying to achieve.

If you define an id property with getter and setter in the webwork action it’ll be automatically populated with the value of query string ?id=${} when the action is invoked.

Then you can use Java API such as IssueService (injected into the action) to access the issue object by id.
You can use it to render content in issue_dialog.vm and it should be displayed as a dialog due to trigger-dialog class of the link


I’ve made another topic here: Displaying a custom dialog in Jira

This new topic explains what I’m trying to achieve, and how I tried (without success) to do it.

Maybe the webwork isn’t the best way to do what I want, I don’t know.

Quentin Bazin