Hi,
I don't think you should try to initiate the ComponentAccessor. You can use it directly like this:
IssueTypeManager itm = ComponentAccessor.getComponent(IssueTypeManager.class);
But prefered way of doing it is to simply specify in the constructor that you will need this object:
public MyPluginComponentImpl(ApplicationProperties applicationProperties, IssueTypeManager itm) { this.applicationProperties = applicationProperties;
Feel free to mark any of my answers as best answers to mark this question as solved if it helped you with your problems :)
BR
Christoffer
If we are talking about the same things, it's also explained here:
https://developer.atlassian.com/pages/viewpage.action?pageId=4227139
/Christoffer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Christoffer. It helped me, I was able to create custom type. Though, I was getting error that ComponentAccessor is not initialized, even after Ihave made object of it and assigned null value to it. So, I have disabled unit test and everything was fine then. Thanks again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you try to use for example:
ComponentAccessor.getComponent(IssueTypeManager.class)
or
ComponentAccessor.getComponentOfType(IssueTypeManager.class)
instead of using the Jirautils to load the class?
BR
Christoffer
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.