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

JIRA.Forms.createCreateIssueForm works - but how can I open the edit issue dialog?

Florian Bauer
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.
February 5, 2015

by using the following js code I am able to open the create Issue dialog:

JIRA.Forms.createCreateIssueForm({parentIssueId:null,pid:null,issueType:null}).asDialog({
			  trigger: document.createElement("a"), 
			  id: "create-issue-dialog",
			  windowTitle: AJS.I18n.getText('admin.issue.operations.create')
			}).show();

my questions are:

  1. where can I find documentation to this JS stuff?
  2. how can I set a field value (e.g. for a custom field)
  3. how can I open the edit Issue dialog?

Cheers,

Florian

 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 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.
March 30, 2016

Hey Florian,

Take a look at the QuickEditPlugin. I learned how to use it to open some dialogs and it seems to be possible to open the edit issue one too. 

Here is how I open some of them:

For "create issue dialog":

JIRA.Forms
  .createCreateIssueForm({pid: projectId})
  .asDialog({windowTitle: 'Create Issue'})
  .show();
 
// OR
 
var createCreateIssueForm = require('quick-edit/form/factory/create-issue');
createCreateIssueForm({pid: projectId})
  .asDialog({windowTitle: 'Create Issue'})
  .show();

For "create subtask" dialog:

JIRA.Forms
  .createSubtaskForm({parentIssueId: parentIssueId})
  .asDialog({windowTitle: 'Create Subtask'})
  .show();
 
// OR
 
var createSubtaskForm = require('quick-edit/form/factory/create-subtask');
createSubtaskForm({parentIssueId: parentIssueId})
  .asDialog({windowTitle: 'Create Issue'})
  .show();

I hope it helps!

0 votes
Florian Bauer
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.
February 5, 2015

or is there any other official way to open standard dialogs?

TAGS
AUG Leaders

Atlassian Community Events