We're trying to use JIRA Issue Collector with one of our products and we've got a few problems with our custom javascript. We basically just followed the instructions found athttps://confluence.atlassian.com/display/JIRA/Advanced+Use+of+the+JIRA+Issue+Collector but if I set a field using the `fieldValues` property on `ATL_JQ_PAGE_PROPS` it won't be present in the story, even though the custom field is defined for that particular story type. Additional information: If I make `fieldValues` dynamic (aka a function) I can see it running on page load, but only once. I would expect it to run when a user clicks the 'Provide Feedback' button. Is this behaviour correct? I also found that `ATL_JQ_PAGE_PROPS` is undefined in both the iframe and the top frame. Any help greatly appreciated!
This is how I solved this in a plugin of mine (this instantiates three different issue collectors on the same page):
jQuery.getScript("https://xxx/issuecollector.js?collectorId=19153ff3"); jQuery.getScript("https://xxx/issuecollector.js?collectorId=db942931"); jQuery.getScript("https://xxx/issuecollector.js?collectorId=3c52dcd6"); jQuery(document).ready(function() { window.ATL_JQ_PAGE_PROPS = jQuery.extend(window.ATL_JQ_PAGE_PROPS, { '19153ff3' : { triggerFunction : function( showCollectorDialog ) { jQuery('#collectBug').click( function(e) { e.preventDefault(); showCollectorDialog(); }); } , fieldValues: { versions : "10400", security : "10003", customfield_13502 : "11490" } }, 'db942931' : { triggerFunction : function( showCollectorDialog ) { jQuery('#collectFeatureRequest').click( function(e) { e.preventDefault(); showCollectorDialog(); }); } , fieldValues: { versions : "10400", security : "10004", customfield_13502 : "11491" } }, '3c52dcd6' : { triggerFunction : function( showCollectorDialog ) { jQuery('#collectSuportRequest').click( function(e) { e.preventDefault(); showCollectorDialog(); }); } , fieldValues: { versions : "10400", security : "10000", customfield_13502 : "11492" } } }) });
Hi Marcell,
Have you been able to achieve updating the fieldValues aside from the initial loading? I'm facing the same problem..
Thanks,Nick
It looks like you're new here. Sign in or register to get started.