Add menu items to Agile board

I am just beginning with Atlassian Connect development, and want to create a simple add-on. I’ve followed the static tutorials and they work fine.

I am trying to add a menu to the agile board using the location “” location and following one of the tutorials.

I simply want a javascript alert on the screen when an item on the menu is clicked. Eventually I want the menu item to trigger the create issue dialog to add a story to an Epic if one is selected on the board (not sure if this is possible but I’m using this scenario to learn).

My connect descriptor is fine and the menu appears and there is an Add Story link in the menu but clicking does nothing - menu just disappears.

I am sure I am missing some fundamentals here, and I am not all that experienced with Javascript.

Could anyone share some sample code, or help me figure out what I am doing wrong?

  1. How should I write the html to render the menu item? Which AUI classes should I be using? At the moment I just have
                <a href="" onclick="alert('help');">Add Story</a>

But the alert is never displayed.

  1. I’ve added an onclick as above, but what is the ‘correct’ way to add handlers and call the AP interface e.g. to call the AP.jira.openCreateIssueDialog.

I realise the above is a lot to ask but any and all help would be appreciated.