使用Atlassian插件在JIRA中创建问题类型
我正在尝试使用以下代码创建自定义问题类型使用Atlassian插件在JIRA中创建问题类型,jira,jira-plugin,Jira,Jira Plugin,我正在尝试使用以下代码创建自定义问题类型 IssueTypeManager itm = (IssueTypeManager) ComponentAccessor.getComponentOfType(IssueTypeManager.class); itm.createIssueType("issueType", "issueType", "https://jira.atlassian.com/images/atlassian-jira-logo-large.png"); 我已经在At
IssueTypeManager itm = (IssueTypeManager) ComponentAccessor.getComponentOfType(IssueTypeManager.class);
itm.createIssueType("issueType", "issueType", "https://jira.atlassian.com/images/atlassian-jira-logo-large.png");
我已经在Atlassian-plugin.xml文件中包含了以下行
<component-import key="IssueType" interface="com.atlassian.jira.config.IssueTypeManager" />
但是它在运行测试用例时抛出了一个错误。错误为“ComponentAccessor未初始化”
你能帮帮我吗?
谢谢 您可以尝试将IssueTypeManager作为构造函数的参数添加到模块类中-它应该自动注入。我认为您不需要atlassian-plugin.xml声明您可以发布完整的类和插件xml吗?您可以尝试在模块类中添加IssueTypeManager作为构造函数的参数-它应该自动注入。我认为您不需要atlassian-plugin.xml声明您可以发布完整的类和插件xml吗?