I am trying to change the component of an issue based on which button (image) is clicked. I verified the fieldValues part works fine when using a value, even with the multiple IDs. I've verified the switch/case statements are working. When using the code below, I get an error, which I assume is the component piece failing. Is this possible? Or is there a better way to do what I need? I am doing this within a Confluence HTML Macro.
<script type="text/javascript"> var componentId; window.ATL_JQ_PAGE_PROPS = { "triggerFunction": function(showCollectorDialog) { jQuery("#button1, #button2).click(function(e) { e.preventDefault(); showCollectorDialog(); switch($(this).prop('id')){ case 'button1': componentId = '10000'; break; case 'button2': componentId = '20000'; break; } }); }, fieldValues:{ components: componentId } }; </script> <input type="image" src="http://confluence.com/image1.png" id="button1" /> <input type="image" src="http://confluence.com/image2.png" id="button2" />
Update: I've created a working solution by using multiple collectors instead of changing variables with a single collector. Not ideal, but it will be fine.
Community moderators have prevented the ability to post new answers.
The error is: "Oops! Something went wrong... Don't worry though! We've logged this problem and will look into it soon!"
What is the error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.