We want to trigger the create-linked-issue dialog from our JIRA plugin:
We know how to trigger the quick-edit-issue and the quick-create-issue dialogs. To use these dialogs, we included the following dependencies in our atlassian-plugin.xml:
<dependency>com.atlassian.jira.jira-quick-edit-plugin:quick-edit-issue</dependency>
<dependency>com.atlassian.jira.jira-quick-edit-plugin:quick-create-issue</dependency>
In Javascript, we use the following code to trigger the create-issue-dialog:
var createCreateIssueForm = require('quick-edit/form/factory/create-issue');
createCreateIssueForm({
}).asDialog({
windowTitle : createKnowledgeElementText
}).show();
closeDialog();
How can we use the create-linked-issue dialog?
Hi @Anja Kleebaum,
This dialog is a little... tricky, for a number of reasons.
Depending on the section of the application you are in, there are a few implementations of this dialog.
In the core of Jira, there is a `jira.webresources:dialogs` web-resource, which will load a `jira/dialog/link-issue-dialog-factory` AMD module. This module exposes a `createLinkIssueDialog` function, which accepts a single "trigger" parameter, which can be either a DOM node or CSS selector.
Here's the problem, though: the issue ID for the dialog is retrieved from a page-specific API which is probably not implemented on every page. In other words, it is tightly coupled to the pages it was intended to be used on, and isn't inherently re-usable.
If you're on the view issue page, it will probably work. But, then again, if all you wanted to do was trigger the existing issue link dialog on the existing issue view page, you could instead programmatically click a ".issueaction-link-issue" element to open it.
Rather than attempting to re-use the pieces of Jira's link issue dialog, it may instead be simpler to construct your own dialog, then interface with Jira's REST endpoint for managing the issue link data:
One final note: as this is a development question, you may get more prompt assistance in future on our developer community forum: community.developer.atlassian.com
Cheers,
Daz
Hi @Daz,
thanks a lot for your answer! We constructed our own "create-and-link-dialog" and will stick with it:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.