Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic functions not working in Issue Collector

roy86
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 22, 2019

Hi Team,

I am trying to allow users to input some information prior to the issue collector launching. I am following the instructions: https://confluence.atlassian.com/adminjiracloud/advanced-use-of-the-jira-issue-collector-788726105.html#AdvanceduseoftheJIRAissuecollector-Dynamicfunctions

 

I find that this feature does not call the function as the window is shown, only on initial page ready.

 

Am I missing something?

$(document).ready(function() {
  window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS,{
    'd9211552' : {
      triggerFunction : function(showCollectorDialog) {
        $('#feedback_button').click( function(e) {
          e.preventDefault();
          setTimeout(function() {showCollectorDialog()},500);
        });
      },fieldValues : function() {
        var values = {};
        values[ 'summary' ] = $('#jira-summary').val();
        console.log(values)
        return values;
      }
    }
  });

  setTimeout(function(){
    $("#feedback_button").click();
  },500);
})

Output: {summary: ""}

This is only shown once, not when collector is closed and opened again.

 

0 answers

Suggest an answer

Log in or Sign up to answer