How can I create a dialog box from a link in More section for issues screen in Jira7 Edited

Hi,

I am working on a jira 7 plug-in to create a new web item in the More section of the issues screen. Upon clicking the web item- a new dialog box should appear and prompt the user to enter some details in a form.

I am able to create the new item in More list using web-section and web-item. Now I want to create a dialog box upon the user click. I wish to use Dialog2 here. Can anyone point me to a tutorial or sample code? 


PS: I am new to jira plugin development!


Thanks in advance!

1 answer

1 accepted

To add some popup dialog you should:

1. Add menu item in some dropdown menu https://developer.atlassian.com/server/jira/platform/adding-menu-items-to-jira/. But do not put any link:

<web-item key="website_link" name="Company Web Site" section="some_section" weight="10">
        <label>My link</label>
        <link linkId="website_link"/>
    </web-item>

2. Decide on which page will appear this menu with your link, to define proper "context".

3. Create new web-resource with proper context https://developer.atlassian.com/server/jira/platform/web-resource/

4. Add javascript file to the web-resource with "click handlers" and "dialog open" functions. Somethong like this:

(function ($) {
$(document).ready(function () {
// step 1. put dialog HTML at the and of <body> element
// step 2. set click handler to your web-item
// step 3. call AJS.dialog2().show();
});
})(AJS.$);

@Domenico Manzo This is working in issues view, but not in the issues search view. Have you faced anything like this before? Question - 696522#M227625. Thanks

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,774 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot