Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger the create project popup with JIRA plugin?

Tanner Reese June 25, 2018

Within the JIRA java API is it possible to make JIRA bring up the project creation menu on a method call? Is there a link to the project creation dialog to which one might redirect a request?

Does there exist a JavaScript trigger that one can attach to the click event of the button? Something like this: 

AJS.$("#web-item-key").click(function(e){
e.preventDefault();
// trigger Create Project dialog
});

1 answer

1 vote
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 25, 2018

You can add a button somewhere that triggers the opening of the 'Create' dialog. You won't be able to do that from Java though because the redirect won't open the dialog.

It is possible to add web items or even javascript using web resources in a plugin. Check those options to see if that helps.

Tanner Reese June 25, 2018

But what does the web item link to in order to trigger the create project dialog to open?

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 25, 2018

You have to add your own button using web-item module in the UI somewhere, based on what your plugin does. The button will be similar to the standard 'Create' button JIRA has.

Tanner Reese June 25, 2018

But what do I set the link and param target elements of the web item module (in atlassian-plugin.xml) to so that the web item will link to the create project dialog?

Suggest an answer

Log in or Sign up to answer