Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Multiple Issue Collectors on Single Page Not working

Walter Hartman September 25, 2018

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?

 

3 answers

1 vote
Brad Martin June 12, 2019

Walter, Did you ever get this to work?  I am running into the same issue.  

Walter Hartman June 12, 2019

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>
Like # people like this
Brad Martin June 12, 2019

Thank you so much!!! That worked for me as well!

Walter Hartman June 13, 2019

Excellent!

Jason Holmes September 3, 2019

Thanks for sharing Walter! Helped me out too.

V April 29, 2020

Thanks it worked.

Paul van den Berg November 12, 2020

Thanks! You really helped me out

satender346 December 3, 2020

Thanks, Working for me as well. 

Cyril Egan June 29, 2021

Brilliant!  Works for me too!

0 votes
Sarah Wright January 23, 2023

winner

Meant this as a comment on the solution!

0 votes
mickel February 14, 2019

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events