Passing custom context parameters to admin pages. A bug?

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

  1. Log into a Jira Cloud instance that has at least one app installed.
  2. Go to the Administration → Apps area
  3. Click on a menu item associated with an app
  4. 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.

I have the same issue. Having a single configuration page with context parameters works, but can also have issues see Side menu for app broken, only loads current page on click, refresh is required to load the correct page

1 Like

Thankyou @markrekveld and @david.pinn I confirm it’s a bug. I’ve created ACJS-1179 and started working on a fix

1 Like