Why am I redirect with a webItem linked to a dialog ?

Florian Dewulf October 26, 2017

Hi,

 

 

My goal is to have a link in the left sidebar of my project, and when I click on it, I would like to open a dialog.

I'm using node-atlassian-connect, I followed the documentation, and I got a json to manage my modules like this :

"modules": {
"webItems": [
{
"name": {
"value": "Creer un client"
},
"location": "jira.project.sidebar.plugins.navigation",
"weight": 200,
"context": "addon",
"key": "module-create-customer",
"target": {
"type": "dialogmodule",
"options": {
"key": "module-create-customer-dialog"
}
},
"conditions": [
{
"condition": "user_is_logged_in"
}
]
}
],
"dialogs": [
{
"key": "module-create-customer-dialog",
"name": {
"value": "Atlassian de merde"
},
"url": "/test-dialog",
"options": {
"size": "large",
"header": {
"value": "Creation d'un customer"
}
}
}
]
}

 

According to the documentation, it seems right. The problem is, when I click on my webItem, the dialog appears and immediatly, I'm redirected to a 404 not found page.

After a couple hours investigating, I found the issue. My webitem is a generated as a html link, so the Javascript behind open the dialog but the html is still interpreted and so the browser follows the link.

When I remove the link thanks to the developer panel of Chrome, I'm not redirected and my dialog appears exactly like I want.

 

Is there something I don't understand or do you see a mistake ? Or is there an issue with the webItem generation from Atlassian ?

I don't have any way to modify this output html, do I ?

 

Thanks for your help,

Regards, Florian.

0 answers

Suggest an answer

Log in or Sign up to answer