Hi Team,
I've added a link to comments action in Confluence using web-item in the plugin xml.
This new link openes a Jira issue collector dialog.
I would like a text field in the dialog to be prepopulated with the comment details (or just comment id).
Is this possible?
Edit: I know that according to the documentation you can't do it, the field values are populated only during page load and not when dialog opens, but I was wondering if there was a workaround.... Assuming my Confluence and Jira are on different sub-domains
Thanks
Community moderators have prevented the ability to post new answers.
I was also hit by this problem (cannot update the default values once the collector is loaded) which I solved by putting the ajax call and the default parameter code into the click handler of a custom trigger. It basically loads and builds the collector every time the trigger is clicked. A global object is then referenced in the default value to fetch the most recent values.
This should be the minimal excerpt to make it work, there is also a timed check to ensure network latency does not break it.
globals.collector_test = function() { if ( undefined != globals.open_data_collector ) { clearInterval(globals.collector_test_interval_id); setTimeout(globals.open_data_collector,0); } } globals.click_handler = function(e) { jQuery.ajax({ url: "https://my-server/jira/link-to-collector", type: "get", complete : function() { globals.collector_test_interval_id = setInterval(globals.collector_test,500);}, cache: true, dataType: "script" }); window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, { '6b808d35' : { "triggerFunction": function(showCollectorDialog) { globals.open_data_collector = function(e) { showCollectorDialog(); }; }, fieldValues : { customfield_10401 : globals.form_data , }, } }); }
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.