I am getting error in REST plugin.
ComponentAccessor has not been initialised.
I am using static method ComponentAccessor.getComponent
i think you have to try with getComponentOfType(Class<T> componentClass)
check this doc
https://docs.atlassian.com/jira/latest/com/atlassian/jira/component/ComponentAccessor.html
can you share your code ?
why can't you instialize this through constructor?
check here, in this class it is insitialized through constructor and used
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just out of curiosity, where in your class are you trying to receive the ComponentAccessor?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
import com.atlassian.jira.component.ComponentAccessor;
if (fieldConfigId != null)
{
FieldConfigManager fieldConfigManager = ComponentAccessor.getComponent(FieldConfigManager.class);
fieldConfig = fieldConfigManager.getFieldConfig(fieldConfigId);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you try with getComponentofType(FieldConfigManager.class) method
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.