Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
worklogPreEntryParameters.timeSpent = "10m"

Get Issue Details Every Time When Issue Picker Changes

Code Block
languagejs
def script = '''
  function issueChanged() {
    var issueKey=AJS.$("#log-work-issue-picker").val()[0];
    console.log("Issue key:" + issueKey);
    
    fetch("/rest/api/2/issue/ERP-75").then(function(response) {
      if (response.status === 200) {
        response.json().then(function(data) {
          console.log(data);
        });
      }
    });
  }
  AJS.$(document).on("change", "#log-work-issue-picker-field", function(evt) {
    setTimeout(issueChanged, 10);
  });

'''

worklogPreEntryParameters.jsScript = script;

return worklogPreEntryParameters;