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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

144 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you