I have a JIRA add-on that displays a dialog using the method described on this page.
Sample atlassian-plugin.xml:
<web-item key="do-thing-menu-item" name="Do Thing Menu Item" section="operations-attachments">
<description key="thing.description"/>
<label key="thing.label"/>
<link linkId="do-thing-action">/secure/DoThing!default.jspa?id=${issue.id}</link>
<styleClass>trigger-dialog</styleClass>
</web-item>
<webwork1 key="do-thing-action" name="Do Thing Action" class="java.lang.Object">
<actions>
<action name="com.example.DoThing" alias="DoThing">
<view name="input">/templates/do-thing.vm</view>
<view name="error">/templates/do-thing.vm</view>
</action>
</actions>
</webwork1>
The <web-item>
module adds an entry to the “More” menu on the view issue page, with a target of /secure/DoThing!default.asp?id={issue id}
.
When the link is clicked, <styleClass>trigger-dialog</styleClass>
tells JIRA to show a dialog instead of navigating to the target URL.
The linkId
in the web-item
maps to a <webwork1>
module, backed by the com.example.DoThing
class (a subclass of JiraWebActionSupport
).
When invoked, the class performs some server-side processing (e.g. reading an entity property stored in the database), and returns HTML content for the dialog.
In all versions of JIRA 7.x up to and including 7.9.x; this worked as described in the documentation link above.
As of JIRA 7.10.x, when the new UI design was introduced, this method of triggering a dialog no longer appears to work.
Clicking the menu item no longer opens a dialog, but instead navigates to the link URL /secure/DoThing!default.asp?id={issue id}
.
This also means that the Submit button / cancel link rendered by the velocity template no longer correctly return to the view issue page. Previously, clicking Submit would submit the form in the dialog, then close the dialog and reload the view issue page; while the cancel link would just close the dialog.
I’m aware that the AUI Dialog 2 now seems to be the recommended way of showing a dialog; but it is unclear from the documentation how to use Dialog2 with a webwork item that has a server-side JiraWebActionSupport
class?
In other words, what specific steps do I need to take to transition from using trigger-dialog?