public function createKanban()
 {
     $kanban_name = $this->request->get('kanban-name');
     $tracker_id = $this->request->get('tracker-kanban');
     $tracker = $this->tracker_factory->getTrackerById($tracker_id);
     $user = $this->request->getCurrentUser();
     $hierarchy = new Tracker_Hierarchy();
     if (!$user->isAdmin($this->group_id)) {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('global', 'perm_denied'));
         return;
     }
     if ($this->kanban_manager->doesKanbanExistForTracker($tracker)) {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_agiledashboard', 'kanban_tracker_used'));
         $this->redirectToHome();
         return;
     }
     try {
         $hierarchy->getLevel($tracker_id);
         $is_in_hierarchy = true;
     } catch (Tracker_Hierarchy_NotInHierarchyException $exeption) {
         $is_in_hierarchy = false;
     }
     if ((count($this->planning_factory->getPlanningsByBacklogTracker($tracker)) > 0 || count($this->planning_factory->getPlanningByPlanningTracker($tracker)) > 0) && !$is_in_hierarchy) {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_agiledashboard', 'tracker_used_in_scrum'));
         $this->redirectToHome();
         return;
     }
     if ($this->kanban_manager->createKanban($kanban_name, $tracker_id)) {
         $GLOBALS['Response']->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('plugin_agiledashboard', 'kanban_created', array($kanban_name)));
     } else {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_agiledashboard', 'kanban_creation_error', array($kanban_name)));
     }
     $this->redirectToHome();
 }
 public function createKanban()
 {
     $kanban_name = $this->request->get('kanban-name');
     $tracker_id = $this->request->get('tracker-kanban');
     $tracker = $this->tracker_factory->getTrackerById($tracker_id);
     $user = $this->request->getCurrentUser();
     if (!$user->isAdmin($this->group_id)) {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('global', 'perm_denied'));
         return;
     }
     if (!$tracker_id) {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_agiledashboard', 'no_tracker_selected'));
         $this->redirectToHome();
         return;
     }
     if ($this->kanban_manager->doesKanbanExistForTracker($tracker)) {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_agiledashboard', 'kanban_tracker_used'));
         $this->redirectToHome();
         return;
     }
     if ($this->isTrackerUsedInScrum($tracker)) {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_agiledashboard', 'tracker_used_in_scrum'));
         $this->redirectToHome();
         return;
     }
     if ($this->hierarchy_checker->isScrumHierarchy($tracker)) {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_agiledashboard', 'hierarchy_used_in_scrum'));
         $this->redirectToHome();
         return;
     }
     if ($this->kanban_manager->createKanban($kanban_name, $tracker_id)) {
         $GLOBALS['Response']->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('plugin_agiledashboard', 'kanban_created', array($kanban_name)));
     } else {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_agiledashboard', 'kanban_creation_error', array($kanban_name)));
     }
     $this->redirectToHome();
 }