Hello,
Since last Friday, we have encountered a huge issue with the Forge global page module. It’s also present in the project page and admin page modules, but let’s focus on the global page. Our global page consists of multiple sections, each with multiple entry points. We depend on this menu a lot.
So first, let’s look at part of the manifest.
jira:globalPage:
- key: global-page
resource: main
layout: blank
resolver:
endpoint: backend
title: Title
icon: ${connect_baseUrl}/images/icon.png
sections:
- header: Dashboards
pages:
- title: Dashboard
route: dashboard
icon: ${connect_baseUrl}/images/icon.png
- header: Repository
pages:
- title: Test cases
route: test-cases
icon: ${connect_baseUrl}/images/icon.png
- title: Test cycles
route: test-cycles
icon: ${connect_baseUrl}/images/icon.png
The problem is that if we select Dashboard and then try to navigate to another page, for example, test cases, the navigation doesn’t work. It worked flawlessly for the past year, and only broke last week.
So how do we detect the changes, and where did we find the bug in Forge?
-
We get the context
import { view } from ‘@forge/bridge’;
…
const context = await view.getContext(); -
Because of how the menu works, we always receive info that we are inside the module global-page, so we had to use a different object to find the page the user selected. To retrieve the exact location of the user, we retrieve it from the URL. And here we see the issue. The object below is no longer updated. It stays the same as when the user first opened the app. Only a refresh fixes the issue.
context.extension.location
Did you also encounter this problem? Is there any workaround? Is there a bug for this issue?