When I'm trying to add multiple custom issue collectors to a confluence page using an image to trigger the collector form on the page.
I can get it working no problem with just one issue collector, however no matter how I ad the second image and issue collector only one image will work at that point.
I've read the Advanced use of the JIRA issue collector documentation and it does go over adding them as regular issue collector but not as custom so I'm struggling to get the code to work properly. Below is a sample code I use for one collector inside of the HTML macro in confluence. That code I use on different pages with different issue collectors because I can't get them to work all together on one page.
When I try to add another "script type" and "input type" above the "<script type="text/javascript">window.ATL_JQ_PAGE_PROPS = {" line of code as suggested in this community answer (https://community.atlassian.com/t5/Confluence-questions/Multiple-Issue-Collectors-on-Single-Page-Not-working/qaq-p/899692) it doesn't seem to work. Any suggestions?
I know you all don't support code necessarily but If I could just get the correct format then maybe I can work with it.
--------------------------------
<!DOCTYPE html>
<html>
<title></title>
<input type ="image" src="https://myjira.com" height="120" width="120" id="Option2"></input>
<script type="text/javascript" src="https://myjira.com/s/c4667e564d068f525dd8aaba4c655792-T/en_US52t8i1/6341/3/1.4.16/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=en-US&collectorId=9299a31b"></script>
<script type="text/javascript">window.ATL_JQ_PAGE_PROPS = {
//=== Option 2 ===
'9299a31b' :{
"triggerFunction": function(showCollectorDialog) {
jQuery("#Option2").click(function(e) {
e.preventDefault();
showCollectorDialog();
});
},
// ==== we add the code below to set the field values ====
fieldValues: {
summary : 'New Project Request – Mirror Existing Configuration',
description : 'Project Name: [The name of your project]\r\nProject Key: [A one-word unique identifier for your project (limit is 10 alpha characters). If none is provided, the default key is auto-created using the first letter of the Project Name provided above.]\r\nProject Lead: [Main point of contact for the project, if not requester]\r\nProject Administrator(s): [Project administrators can add additional users to roles, administer project boards, etc.]\r\nProject Settings: [Provide the URL or the Project Key of the MyJira project we should mirror]'
}
}
};
</script>
Hi Jeremy,
Thank you for contacting us about this. I noticed you raised the same question with the support team, but then you closed the issue yesterday and marked it as resolved.
Can you let us know what the solution was? It could help other users in the future.
Regards,
Shannon
The solution to this issue was adding all three issue collectors inside of the one HTML macro. The set up/script format that we used is listed below.
-------------------------------------------
<table id="test" style ="margin-left:auto;margin-right:auto;"> <tr> <td><b>Default Project</b></td> <td><b>Mirror Existing Project</b></td> <td><b>Custom Project</b></td> <tr> <!-- Default --> <td align="center"> <input type ="image" src="https://yourinstanceID/download/thumbnails/419150305/default.png?version=1&modificationDate=1570199094890&api=v2" height="120" width="120" id="Option1"></input> <script type="text/javascript" src="https://yourinstanceID/s/c4667e564d068f525dd8aaba4c655792-T/en_US52t8i1/6341/3/1.4.16/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=en-US&collectorId=b68bc359"></script> <!-- Mirror --> <td align="center"> <input type ="image" src="https://yourinstanceID/download/thumbnails/419150305/mirror.png?version=1&modificationDate=1570199094890&api=v2" height="120" width="120" id="Option2"></input> <script type="text/javascript" src="https://yourinstanceID/s/c4667e564d068f525dd8aaba4c655792-T/en_US52t8i1/6341/3/1.4.16/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=en-US&collectorId=9299a31b"></script> <!-- Custom --> <td align="center"> <input type ="image" src="https://yourinstanceID/download/thumbnails/419150305/custom.png?version=1&modificationDate=1570199094890&api=v2" height="120" width="120" id="Option3"></input> <script type="text/javascript" src="https://yourinstanceIDfv/s/c4667e564d068f525dd8aaba4c655792-T/en_US52t8i1/6341/3/1.4.16/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=en-US&collectorId=2d13673b"></script> <!-- Scripts for each collector --> <script type="text/javascript">window.ATL_JQ_PAGE_PROPS = {
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jeremy,
That's great, thank you for sharing that with us! That should surely help if anyone is looking to add multiple issue collectors in the future.
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I couldn't replicate this. I added both scripts from two different issue collectors to same HTML macro but then when button to click, it always display one collector, then popup window was wrong format.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.