A bug?
I’ve been bashing my head against a problem with Atlassian Connect navigation today, and I’m pretty sure it represents a bug in Connect.
Basically, it appears that you can’t pass custom context parameters to an app’s admin pages.
This works
I have specified an admin page in my app descriptor like this:
{
"key": "migrations",
"url": "/pages/migration/{ac.id}",
"name": {
"value": "Cloud migrations"
},
"location": "admin_plugins_menu/admin-section",
"weight": 130
}
When I click the ‘Cloud migrations’ link under Administration → Apps, all goes well. The browser URL becomes:
https://[base]/plugins/servlet/ac/[appkey]/migrations?s=[appkey]__migrations
This does not work
In response to a user’s action in the browser, I use AP.navigator.go
to navigate to the migrations
module, passing a custom context parameter ac.id
. The URL becomes:
https://[base]/plugins/servlet/ac/[appkey]/migrations?s=[appkey]__migrations&ac.id=1
What I expect to see is my app’s page appear in an iFrame in the context of the Administration → Apps page.
What actually happens is that my app’s page appears in an iFrame in the context of the Administration → System page.
You can reproduce this
- Log into a Jira Cloud instance that has at least one app installed.
- Go to the Administration → Apps area
- Click on a menu item associated with an app
- Append the following to the URL that appears in the browser’s address bar:
?ac.id=1
if there is no query string there already, or&ac.id=1
if there is already a query string there.
I’d be much obliged if someone would confirm my suspicion that this is a bug. Many thanks.