How to get the Jira project ID in a Custom UI app in the projectSettingsPage module?

Hello:

I’m trying to convert a jira connect app to forge but I’m running into an issue. The app is loaded in the projectSettingsPage module and I need to get the project id of the project that is loading the app. We use the project id to associate data created in the app with the project that’s loading the app. In connect I’m able to add a placeholder on the url that is used to load the app to get the project id. When the app is loaded, the placeholder is replaced (by Atlassian) with the actual project id and I’m able to read it in the app. No such functionality seems to exist in Forge. The closest I’ve come to possibly finding what I need is in the view object of the Forge bridge API. This object contains a getContext function that seems like it would be a good place to retrieve the project id but unfortunately it’s not there.

I would appreciate any assistance that anyone can provide.

Thanks.

Hey @Justin_Kredible,

The project.id and project.key should be available within the extension data in both UI Kit and Custom UI. Could you please confirm that you’re not seeing this within the extension data within this module?

Cheers,
Sean

Thank you for your response Sean. You are correct. I called the function and can confirm that the project information is contained in the extension attribute. Cheers.

1 Like