Unable to retrieve addon module URL inside new jiraIssueContents web panel

Hey Team,

Excited to be developing my first JIRA plugin. Similar to the invision example in the docs, we’d like to create a pop up from the new issue view app buttons to allow people to add information to their issues that correlates to our systems.

I have the button showing, and the logo and tooltip are correct. However, the content of the popup errors with this:

Error: The content resolver threw the following error:
Loading app...
Unable to retrieve addon module URL. Please check your specified module key.

Instead of showing my text field.

Inside my atlassian-connect.json, I have

		"jiraIssueContents": [{
			"icon": {
				"width": 48,
				"height": 48,
				"url": "img/logo.png"
			},
			"target": {
				"type": "web_panel",
				"url": "/add-xxx"
			},
			"tooltip": {
				"value": "Add xxx from yyy"
			},
			"name": {
				"value": "xxx"
			},
			"key": "add-xxx"
		}]

I have created a route and for /add-xxx and page, add-xxx.hbs

Using the chrome inspector I can see a failed POST request to https://mycompany.atlassian.net/plugins/servlet/ac/yyyy-for-jira-dev/add-xxx
which is odd. I wouldn’t expect a post request to get a webpage. As an aside - what is this?

In any case, I added a route for app.post(‘add-xxx’… and returned the rendered page anyway. Still a 404.

Any ideas?

Are there any working examples on bitbucket that I can have a look out?

Thanks,
Sam

Here’s the code that worked in the end
In you JS, with document.onload or similar…

  AP.events.on('ISSUE_QUICK_ADD_CLICKED', function(event){
    AP.dialog.create({
          key: 'add-foo-dialog',
          width: '500px',
          height: '200px',
          chrome: true,
          header: 'Add foo...'
    });
  });

In your atlassian-connect.js…

"modules": {
		"configurePage": {
			"key" : "add-foo-dialog",
			"name": {"value": "Add Foo"},
			"url" :"add-foo"
		},

This took a bit of guess work based on this.

Hope this helps someone else.

@Docs Team… the example needs to be a lot clearer if you want us to adopt it! :smiley:

Cheers,
Sam

add dialogue module in atlassian-connect.json file also and give it a key same as dynamically created dialogue which is created using
AP.dialog.create… javascript api.