It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Multiple Issue Collectors on Single Page Not working

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?

 

2 answers

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.

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

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 V likes this

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

Thanks for sharing Walter! Helped me out too.

Thanks it worked.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

109 views 3 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you