How to get "AP" method from all.js and where can we use it in React applications?

Continuing the discussion from Finding the currently logged in JSD user with AP.user.getCurrentUser fails:


I’m a react developer, and new to jira.

We’ve a custom app integrated to jira. We want to identify who raised submitted the details without separate authentication for the app.

We have the script all.js included in our index.html as per atlassian documentation. But we need the method “AP” to use the commands provided by atlassian.

How can we capture the AP method?

Where can we use it? can we use it in index.js/app.js to make the atlassian account ID available for multiple components that manage there own state?

Thank you.

Yes, you can use global AP directly anywhere in your application (eslint will not be happy probably, so you might want to wrap it)

1 Like