Left admin sidebar sometimes disappears after navigating from the Apps menu

Hi,

To demonstrate the problem: https://www.youtube.com/watch?v=3Lcr_U6ifT4

I am working on integrating our app to the Jira Apps menu.
If I navigate to an admin page from the Apps menu, it works for the first time, but any consequent attempts make the left sidebar disappear. However, other apps like Zephyr seems to work fine.

Is this a bug in Jira or am I missing something from my config?

{
  ...
  "modules": {
    ...
    "webItems": [
      ...
      {
        "key": "jpdfc-resources-top-menu-item",
        "name": {
          "value": "Better PDF Exporter"
        },
        "context": "page",
        "url": "jpdfc-resources-admin-page",
        "location": "system.top.navigation.bar",
        "weight": 50,
        "icon": {
          "width": 20,
          "height": 20,
          "url": "/jpdfc-icon-light.svg"
        },
        "conditions": [
          {
            "condition": "user_is_admin"
          }
        ]
      }
    ],
    ...
  }
}

Hi @gabor.nagy,

You have specified the context to be page whereas I suspect Zephyr might set the context to be product.

When you set the context to be page, parameters are passed to the URL indicating the current project.

When you set the context to be product, it’s up to the app to provide the URL. I suspect Zephyr aren’t providing any parameters.

Now, after a little investigation, it seems the project parameters are causing the side nav to disappear. I did a little test by creating two webitems both with a context of ‘product’, but with different URLs:

(a) /plugins/servlet/ac/your-app-key/you-admin-module-key?project.key=TEST&project.id=10000.
(b) /plugins/servlet/ac/your-app-key/you-admin-module-key.

Clicking on webitem (a) twice in succession caused the side nav panel to disappear, but the side nav panel remained visible after clicking on webitem (b) multiple times in succession.

I’ll raise a bug for this.

Regards,
Dugald

1 Like

I’ve created https://jira.atlassian.com/browse/JRACLOUD-75074 for this.

1 Like

Hi Dugald,

Thank you very much for your suggestions and for creating the bug report. Unfortunately, using the “product” context and a URL without context parameters behaves the same way for me.

{
   "key": "jpdfc-resources-top-menu-item",
   "name": {
      "value": "Better PDF Exporter"
   },
   "context": "product",
   "url": "/plugins/servlet/ac/com.midori.jira.plugin.pdfview/jpdfc-resources-admin-page",
   "location": "system.top.navigation.bar",
   "weight": 50,
   "icon": {
      "width": 20,
      "height": 20,
      "url": "/jpdfc-icon-light.svg"
   },
   "conditions": [
      {
         "condition": "user_is_admin"
      }
   ]
}

Also, for one of my colleagues, the left side does not even appear on first visit either. Is it possible that different cloud instances behave differently?

Thanks,
Gabor

1 Like

Hi @gabor.nagy,

A Jira engineer wasn’t able to reproduce this by following my instructions in JRACLOUD-75074 so I made some clarifying notes and attached a screen recording of the issue. I also provided the webitem Connect descriptor details in the issue. Having said that, I can’t see why your web item causes the problem because my equivalent seems to avoid the problem. Let’s see if the Jira engineer is able to reproduce the problem and find a fix.

Regards,
Dugald

1 Like