Ejemplo n.º 1
0
 /**
  * Gets the transition for an issue. The issue's state is used as the from state to look up the
  * available transitions, and to populate the registry.
  *
  * @param loginData the user to lazy load the transition if it does not exist in the registry
  * @param boardConfig The board config
  * @param issue the issue to transition.
  * @param toState the state to transition to. This is the actual projects state, and not the
  *     mapped board state
  * @return
  */
 Transition getTransition(
     LoginData loginData, ProjectGroupConfig boardConfig, Issue issue, String toState)
     throws IOException {
   BoardTransitions boardTransitions = boards.get(boardConfig.getCode());
   if (boardTransitions == null) {
     synchronized (boards) {
       boardTransitions = boards.get(boardConfig.getCode());
       if (boardTransitions == null) {
         boardTransitions = new BoardTransitions();
         boards.put(boardConfig.getCode(), boardTransitions);
       }
     }
   }
   return boardTransitions.getTransition(loginData, boardConfig, issue, toState);
 }