Hello, community,
trying to open dialog2 from dialog1 using javascript atlassian connect Add-on for JIRA Cloud.
web-items in atlassian-connect.json:
"webItems": [
{
"name": { "value": "Dialog 1" },
"url": "/dialog1",
"key": "dialog1",
"location": "opsbar-section-custom",
"weight": 100,
"context": "addon",
"target": {
"type": "dialog"
}
},
{
"name": {
"value": "Dialog2"
},
"url": "/dialog2",
"key": "dialog2",
"location": "none",
"context": "addon",
"target": {
"type": "dialog",
"options": {
}
}
}
],
"webSections": [
{
"name": { "value": "Custom Section" },
"location": "opsbar-operations",
"key": "opsbar-section-custom"
}
],
To open a dialog2 I use the following javascript in dialog1ās template:
AP.require("dialog", function(dialog) {
dialog.create({
key: "dialog2",
width: '500px',
height: '300px',
customData: {
}
}).on('close', function(data) {
if (data) {
}
});
});
dialog2 is not opened. The same functionality works in Confluence Cloud and dialog2 is opened.
Any ideas how to make dialog2 be opened? Examples of how to open a dialog2 will be much appreciated.
Thank you.