Hi,
I'm trying to get a list of all the boards related to a specific project by using the following line:
List<Board> sourceProjectBoards = boardManager.getBoardsForProject(sourceProject.getId())
I'm getting the following error:
Error: java.lang.NullPointerException: Cannot invoke method getBoardsForProject() on null object
I understand that I need to get the boardManager object, but I can't figure out how to do that.
Initially I thought it will be similar to how I get projectManager or workflowManager, etc. Using the ComponentAccessor.
But it seemed to be not the case in this one.
Any advice?
Hi
It is too late but the answer is
ComponentAccessor.getComponent(BoardManager.class);
Hmm...My understanding is that projects and boards are not linked directly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Carlos Garcia Navarro to my understanding there has to be some relationship. As when I'm navigating to a particular project, I get on the top left corner a list of all the boards that are associated with this project.
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.