Hello!
I don’t know if it fully answers your question but this snippet should allow opening new tab to external page:
var flag = AP.flag.create({
title: 'Successfully created a flag.',
body: 'This is a flag.',
type: 'success',
actions: {
'actionkey': 'Click me'
}
});
AP.events.on('flag.action', function(event){
if (event.actionIdentifier === ("actionkey")) {
window.open('https://www.atlassian.com', '_blank');
}
});
if you need to open the page relative to your Jira url then you could use this API: Navigator
Also there is some discussion about similar topic here: Show AP.flag with dynamic URL in action
Feel free to contact me if you have more questions.
Cheers!