Embed Jira Issue Collector Form in Confluence

Jira Issue Collector allows users to create Jira tickets without logging in to Jira system. This is useful when you want to collect issues from outside Jira eg. public website, documentation pages etc.

Embed Issue Collector in Confluence

You can embed issue collector form in Confluence page using HTML & Iframe Macro for Confluence. It works because issue collector provides HTML/JS embed code like any other iframe embedding you might already know.

If you are coming from Confluence server, please note that Cloud add-on are rendered inside sandboxed environment. Therefore, HTML macro in Confluence cloud might work a bit differently.

  1. Get Issue collector HTML embed code from Project settings → Issue collectors

    Make sure that you select Custom option as trigger.

  2. Add HTML/JS Code to HTML/Iframe Macro

    1 2 3 4 5 6 7 8 9 10 11 <script type="text/javascript" src="https://bitwelt.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-ucfgv/b/23/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=a3bb5bbb"></script> <script type="text/javascript">window.ATL_JQ_PAGE_PROPS = { "triggerFunction": function(showCollectorDialog) { //Requires that jQuery is available! jQuery("#myCustomTrigger").click(function(e) { e.preventDefault(); showCollectorDialog(); }); }}; </script>

    Now you need to make minor changes in this code. Add following two lines after line 8.

    1 2 $("#container").height(500); AP.resize(500, 500);

    It resizes parent container when issue collector form is opened. Finally, you need button in the page.

    1 2 <button id="myCustomTrigger" class="aui-button aui-button-primary">Give Feedback</button> <div id="container"></div>

Here is complete code example:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 <script type="text/javascript" src="https://bitwelt.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-ucfgv/b/23/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=a3bb5bbb"></script> <script type="text/javascript"> window.ATL_JQ_PAGE_PROPS = { "triggerFunction": function(showCollectorDialog) { //Requires that jQuery is available! jQuery("#myCustomTrigger").click(function(e) { e.preventDefault(); showCollectorDialog(); // start custom code $("#container").height(500); AP.resize(500, 500); // end custom code }); }}; </script> <!-- button start --> <button id="myCustomTrigger" class="aui-button aui-button-primary">Give Feedback</button> <div id="container"></div> <!-- button end -->

So basically, you need to add above custom code and button in embed code copied from Jira.

See it in action below (this will create ticket in our Jira here):