Multiple Issue Collectors on Single Page Not working
Asked by Walter Hartman:

Based on security issues, my organization has disabled the HTML macro so we are using the Markdown macro for some HTML functions to work, including the issue collector. I'm trying to get a specific/clean layout for multiple issue collectors to be on a single landing page, but the instructions on layering the code at <https://confluence.atlassian.com/adminjiraserver/advanced-use-of-the-jira-issue-collector-938847349.html> isn't exactly clear to me as a "novice" user with some basic coding experience.

Here's the setup I have on one page:

1) insert of markdown to create the first button/trigger

2) on a new line, a second markdown to create the next button/trigger to be used

3) a third line using markdown for the last button/trigger on the page

All of the above use the following type of context:

```
<input type ="button" value ="Request a Finance burning ship extension" id="FNEextension"></input>
```

then under the table that I have inserted to organize the page and the buttons, I have a final markdown with the code below (some of the script references updated for security reasons):

```
<script type="text/javascript" src="https://REDACTED/2.0.24/_/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=69e8c326"></script><script type="text/javascript" src="https://REDACTED/2.0.24/_/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=a9f50e3c"></script><script type="text/javascript" src="https://REDACTED/2.0.24/_/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=3aca9c25"></script><script type="text/javascript">// safely use jquery here since the issue collector will load it for you  $(document).ready(function() {	window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, {		//=== CR collector id in first paragraph for question 1 === 		'69e8c326' : {			//=== CR trigger function ===			"triggerFunction": function(showCollectorDialog) {			  $("#FDTCR").click(function(e) {				e.preventDefault();				showCollectorDialog();			  });	  		}	 	}		//=== Inventory collector id in second paragraph for question 2 === 		'a9f50e3c' : {			//=== Inventory trigger function ===	 			"triggerFunction": function(showCollectorDialog) {			  $("#InventoryRequestTrigger").click(function(e) {				e.preventDefault();				showCollectorDialog();			  });			}	 	}		//=== Extension collector id in third paragraph for question 3 === 		'3aca9c25' : {			//=== Extension trigger function ===			"triggerFunction": function(showCollectorDialog) {			  $("#FNEextension").click(function(e) {				e.preventDefault();				showCollectorDialog();			  });	  		}	 	}	}  };</script>
```

None of the buttons work in this attempted setup; when I attempted to just use the separated trigger function code in the same markdown window with the trigger creation markdown, the first two buttons wouldn't work but then the final button would yet it would pull all forms on the page.

Any advice on how to update correctly?


Answers:
author: Brad Martin
body: Walter, Did you ever get this to work? I am running into the same issue.

comments: author: Walter Hartman
body: I did! Here's the way the ending script shows up; and I leveraged a table setup on the page to keep things organized:

```
<script type="text/javascript" src="https://REDACTED/2.0.24/_/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=69e8c326"></script><script type="text/javascript" src="https://REDACTED/2.0.24/_/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=a9f50e3c"></script><script type="text/javascript" src="https://REDACTED/2.0.24/_/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=3aca9c25"></script><script type="text/javascript">window.ATL_JQ_PAGE_PROPS = {//=== CR collector id in first paragraph for question 1 ===  '69e8c326' :{ "triggerFunction": function(showCollectorDialog) { jQuery("#FDTCR").click(function(e) { e.preventDefault(); showCollectorDialog(); });  } },//=== Inventory collector id in second paragraph for question 2 ===  'a9f50e3c' :{   "triggerFunction": function(showCollectorDialog) { jQuery("#InventoryRequestTrigger").click(function(e) { e.preventDefault(); showCollectorDialog(); }); } },//=== Extension collector id in third paragraph for question 3 ===  '3aca9c25' :{ "triggerFunction": function(showCollectorDialog) { jQuery("#FNEextension").click(function(e) { e.preventDefault(); showCollectorDialog(); }); } }};</script>
```


author: Brad Martin
body: Thank you so much!!! That worked for me as well!


author: Walter Hartman
body: Excellent!


author: Jason Holmes
body: Thanks for sharing Walter! Helped me out too.


author: V
body: Thanks it worked.


author: Paul van den Berg
body: Thanks! You really helped me out


author: satender346
body: Thanks, Working for me as well.


author: Cyril Egan
body: Brilliant! Works for me too!


author: Sarah Wright
body: winner

Meant this as a comment on the solution!


author: mickel
body: I was dealing with the same issue, make sure in Jira you made a "custom" issue collector. That way the normal rendered buttons won't show up on your site either.


Tags: atl-adm

issue-collector

jira