Jira:openCreateIssueDialog未定义

时间:2017-03-29 14:03:40

标签: events jira jira-plugin atlassian-connect

我得到了:

  

未捕获的参考错误:未定义openCreateIssueDialog

每当我尝试打开Jira的创建问题对话框时。我正在使用以下部分代码。

AP.require('jira', function(jira){
  jira.openCreateIssueDialog(function(issues){
      alert(issues[0]['fields']['summary']);
  } , {
      pid: 10000,
      issueType: 1
  });
});

1 个答案:

答案 0 :(得分:0)

尝试如下所示:

int32_t A = 5;
uint32_t B = 8;

if (A >= 0 ) {
    if ( (uint32_t)A >= B )
       printf("Test");
}
else
    /* handle error */

请注意,AP.jira.openCreateIssueDialog(function(issues){ alert(issues[0]['fields']['summary']); }, { pid: 10000, issueType: 1, fields : { summary: "Hello World", environment : "My environment", priority : 2, assignee: "tom", reporter: "bob", labels : ["Mylabel","MyOtherLabel"], description : "My first Issue", duedate : "11/Oct/16", fixVersions : 10001, versions : 10000, components : "My component", timetracking_originalestimate: "2w", timetracking_remainingestimate: "3d", worklog_activate: true, worklog_timeLogged: "2" } }); AP.require已弃用,将被删除。

来自Atlassian Connect文档:

  

AP.require和AP.define已弃用,将于2017年8月后删除。

     

现在可以直接从AP调用可用模块,例如AP.request或AP.jira。不会为AP.define提供替代方案。有关详细信息,请参阅迁移到Atlassian Connect JavaScript V5。

https://developer.atlassian.com/static/connect/docs/latest/concepts/javascript-api.html