Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I call standard dialog in popup window from another popup dialog?

GermanBaitinger September 11, 2015

I need to find a way to call a standard "CreateSubTaskIssue.jspa" from my custom dialog.

my custom dialog is opened in popup using next js-code:

JIRA.Dialogs.customDialog = new JIRA.FormDialog({
id: "someid",
 trigger: "a.my-trigger",
 ajaxOptions: JIRA.Dialogs.getDefaultAjaxOptions,
 onSuccessfulSubmit : function(){ },
 issueMsg : 'msg'
});

web-item with <styleClass>my-trigger</styleClass> trigger

and velocity template placed in webwork as <view>.


Clicking on button at the top navigation panel opens my dialog where I choose project, parent issue and issue type ID-s that I want to pass into standard Create Subtask dialog.

I tried to do it by sending a POST-call as submit action of the form in my velocity template:

<form action="/jira/secure/CreateSubTaskIssue.jspa" method="post" class="aui unsectioned">

with parameters from few hidden inputs on the form.

Submitting my dialog opens the standard Create Subtask Issue Dialog, everything looks fine, but submitting this dialog by "Create Subtask" button does not work as I want - window stays gray (as background of popup) and then nothing happens, page says that "AJS is not defined" (F12). After refreshing the page I can see that subtask were successfully created, that means that functionally plugin works good/

My question: Is there any other way to show one popup dialog from another dialog in ?


2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
pelizza
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.
December 17, 2015

Hi there! Did you get some information about this? I'm trying to open the createSubtaskDialog from a screen different from the view issue one. It's is not working and I believe that is because I don't have a current issue to be used on the default dialog's velocity context. I appreciate any help :)

0 votes
pelizza
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.
April 27, 2018

That's my solution:

JIRA.Forms
.createSubtaskForm({parentIssueId: 10100})
.asDialog({windowTitle: 'Create Subtask', id: 'create-subtask-dialog'})
.show();
TAGS
AUG Leaders

Atlassian Community Events