I am trying to create custom issue type from my plugin, but have been unsuccessful so far. I have followed example outlined here, but when I do -atlas-run I get error that IssueTypeManager is not instantiable. I am completly blockedon my plugin development due to this as this is the first thing that needs to happen by the design, so your help is very much appreciated. If you need any more info than this please let me know.
The code is exactly like this:
package com.myjiraplugins;
import com.atlassian.jira.config.IssueTypeManager;
import com.atlassian.jira.util.JiraUtils;
import com.atlassian.sal.api.ApplicationProperties;
public class MyPluginComponentImpl implements MyPluginComponent
{
private final ApplicationProperties applicationProperties;
public MyPluginComponentImpl(ApplicationProperties applicationProperties)
{
this.applicationProperties = applicationProperties;
IssueTypeManager itm = (IssueTypeManager) JiraUtils.loadComponent(IssueTypeManager.class);
itm.createIssueType("mytype", "custom issue type", "/images/icons/issuetypes/genericissue.png");
}
public String getName()
{
if(null != applicationProperties)
{
return "myComponent:" + applicationProperties.getDisplayName();
}
return "myComponent";
}
}