Date: Fri, 29 Mar 2024 15:59:44 +0000 (UTC) Message-ID: <1091314117.25.1711727984454@413a4f130bb1> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_24_1601595659.1711727984453" ------=_Part_24_1601595659.1711727984453 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Jira Issue Collector allows users to create Jira tickets without log= ging in to Jira system. This is useful when you want to collect issues from= outside Jira eg. public website, documentation pages etc.
You can embed issue collector form in Confluence page using HTML & Iframe Macro for C= onfluence. 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 Conflue= nce cloud might work a bit differently.
Get Issue collector HTML embed code from Project settings =E2=86= =92 Issue collectors
Make sure that you select Custom option as trigger.
Add HTML/JS Code to HTML/Iframe Macro
<scrip= t type=3D"text/javascript" src=3D"https://bitwelt.atlassian.net/s/d41d8cd98= f00b204e9800998ecf8427e-T/-ucfgv/b/23/a44af77267a987a660377e5c46e0fb64/_/do= wnload/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugi= n:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-p= lugin:issuecollector.js?locale=3Den-US&collectorId=3Da3bb5bbb"></= script> <script type=3D"text/javascript">window.ATL_JQ_PAGE_PROPS =3D { "triggerFunction": function(showCollectorDialog) { //Requires that jQuery is available!=20 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.
$("#conta= iner").height(500); AP.resize(500, 500);
It resizes parent container when issue collector form is opened. Finally= , you need button in the page.
<but= ton id=3D"myCustomTrigger" class=3D"aui-button aui-button-primary">Give = Feedback</button> <div id=3D"container"></div>
Here is complete code example:
<scrip= t type=3D"text/javascript" src=3D"https://bitwelt.atlassian.net/s/d41d8cd98= f00b204e9800998ecf8427e-T/-ucfgv/b/23/a44af77267a987a660377e5c46e0fb64/_/do= wnload/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugi= n:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-p= lugin:issuecollector.js?locale=3Den-US&collectorId=3Da3bb5bbb"></= script> <script type=3D"text/javascript"> window.ATL_JQ_PAGE_PROPS =3D { "triggerFunction": function(showCollectorDialog) { //Requires that jQuery is available!=20 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=3D"myCustomTrigger" class=3D"aui-button aui-button-primary"&g= t;Give Feedback</button> <div id=3D"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):