Hello, the java backend of our Jira Server plugin receives a project key and a board id from the client in various requests, and we need to check whether the board associated with the given board id belongs to the project associated with the given project key.
Getting the project from the project key is no problem: The servlet’s constructor takes a
@ComponentImport ProjectManager projectManager parameter and receives a fully working
projectManager object this way, and the
projectManager's methods correctly return a
Project object for the provided project key.
Thus, we tried the same approach to get a
Board object for the board id. We added
@ComponentImport BoardManager boardManager to the servlet’s constructor’s parameters; however, the
BoardManager we get this way seems completely oblivious to our jira installation’s boards. All attempts to get at least one
Board object returned failed.
boardManager.getBoard(new BoardId(boardId)) and
boardManager.hasBoardForProject(project.getId()) return nothing.
We also tried the same thing using a
BoardService which has similar methods, but that one also seems to think that no boards exist.
Does anyone know why this is happening? Are there any other ways to confirm that the board associated with the given board id does indeed belong to the project? Thanks a lot!