How to show a Flag outside of the app iframe?

I want to show a Flag in my cloud add-on, but it does not fit the little iframe I have (web panel). It would be also more natural to show it on the top of the issue page.

I know it is possible because I saw Cloud add-ons doing so.

How can I achieve that?

Thanks,
Jack

2 Likes

Hi, @jack, you need to use JavaScript API provided by atlassian-connect. You can read more about this JavaScript API here and about flag here

OK, got it.

It must be AP.flag.create({ instead of AJS.flag({

Thanks @alexter_pr

I’m having the same problem. In fact, that solves the location problem. However, AP.flag.create({}) does not support HTML, while AJS.flag does.

Any idea on how to insert html using AP.flag.create({})?

Thanks!

You cannot insert HTML with AP.flag.

However, you can insert links (use “actions” concept) as described in the documentation: https://developer.atlassian.com/cloud/jira/platform/jsapi/flag/

Cheers,
Jacek