Create Issue Dialog filling the summary and description does not work

I’m trying to launch the issue creation dialog passing the summary and description parameters and it doesn’t work.

JIRA.Forms.createCreateIssueForm(
    {
      pid: 10200,
      issueType : 10100,
      summary: "Summary",
      decription: "Description"
      }
).asDialog().show()

The dialog opens, but the summary and description fields are not filled in and there is no error in the console.

I have seen in the network tab of the chrome devtools, that the dialog is called and it only passes the issue type and the project id as a parameter.

That could be happening?

Thanks in advance.

How did you find this component/documentation?

As far as I can see from the code, it only takes pid and issueType.
You probably have to set those fields in the dialog using JS

We currently bind a function to the event ‘dialogContentReady’ before calling the show method. Within this method we do modify the input elements manually. In addition, we use a unique id in asDialog to not cause a conflict with other dialog (make sure that the opened Dialog has this id)

.asDialog({id: 'somethingUniqueOrGenerated'})

I’m not sure about this, but should check switching issueTypes

If anyone has a better solution, let us know so that we could change it to something better

Hi,
I have found it in the following topic:

And the names of the fields I have based on the following documentation.
https://confluence.atlassian.com/jirakb/how-to-create-issues-using-direct-html-links-in-jira-server-159474.html

Hi,
Currently I am doing this, using the ‘dialogContentReady’ event and filling the value from javascript to the summary and description fields. But I would have liked to do it through the component.

1 Like

It looks to me like this JavaScript component is meant to just display a create issue dialogue, and expects the user to enter details such as description.

To fill it programmatically, dialogContentReady seems like a good choice