Beispiel #1
0
 protected function display()
 {
     if (Tools::isConnectedUser()) {
         // only teamMembers & observers can access this page
         if (0 == $this->teamid || $this->session_user->isTeamCustomer($this->teamid)) {
             $this->smartyHelper->assign('accessDenied', TRUE);
         } else {
             // if 'support' is set in the URL, display graphs for 'with/without Support'
             $displayNoSupport = isset($_GET['support']) ? TRUE : FALSE;
             $this->smartyHelper->assign('displayNoSupport', $displayNoSupport);
             $team = TeamCache::getInstance()->getTeam($this->teamid);
             $min_year = date("Y", $team->getDate());
             $year = isset($_POST['year']) && $_POST['year'] > $min_year ? $_POST['year'] : $min_year;
             $this->smartyHelper->assign('years', SmartyTools::getYearsToNow($min_year, $year));
             //plugins
             $this->smartyHelper->assign('statusHistoryIndicatorFile', StatusHistoryIndicator::getSmartyFilename());
             $this->smartyHelper->assign('effortEstimReliabilityIndicatorFile', EffortEstimReliabilityIndicator::getSmartyFilename());
             if ('computeTeamHistory' == $_POST['action']) {
                 $month = $year == $min_year ? date("m", $team->getDate()) : 1;
                 $day = $year == $min_year ? date("d", $team->getDate()) : 1;
                 if (count($team->getProjects(FALSE)) > 0) {
                     $timeTrackingTable = $this->createTimeTrackingList($day, $month, $year, $this->teamid);
                     $this->generateSubmittedResolvedGraph($timeTrackingTable, FALSE);
                     $this->generateSubmittedResolvedGraph($timeTrackingTable, TRUE);
                     // ExtRefOnly
                     $this->generateTimeDriftGraph($timeTrackingTable);
                     $this->generateResolvedDriftGraph($timeTrackingTable, $displayNoSupport, FALSE);
                     $this->generateResolvedDriftGraph($timeTrackingTable, $displayNoSupport, TRUE);
                     // ExtRefOnly
                     $this->generateEfficiencyGraph($timeTrackingTable);
                     $this->generateReopenedRateGraph($timeTrackingTable);
                     $this->generateDevelopersWorkloadGraph($timeTrackingTable);
                     // --- BEGIN FDJ SPECIFIC ---
                     $this->generateEffortEstimReliabilityGraph($this->teamid, $timeTrackingTable);
                     // --- END FDJ SPECIFIC ---
                     #$this->generateStatusHistoryGraph($teamid);
                 } else {
                     $this->smartyHelper->assign('error', T_('No projects in this team'));
                 }
             }
         }
     }
 }
Beispiel #2
0
            $managedTeamList = $user->getManagedTeamList();
            $managedProjList = count($managedTeamList) > 0 ? $user->getProjectList($managedTeamList, true, $withDisabled) : array();
            $oTeamList = $user->getObservedTeamList();
            $observedProjList = count($oTeamList) > 0 ? $user->getProjectList($oTeamList, true, $withDisabled) : array();
            $projList = $allProject + $devProjList + $managedProjList + $observedProjList;
            // WORKAROUND
            if ($_GET['bugid'] == 'null') {
                $_GET['bugid'] = 0;
            }
            $smartyHelper->assign('bugs', SmartyTools::getBugs(Tools::getSecureGETIntValue('projectid'), Tools::getSecureGETIntValue('bugid', 0), $projList));
            $smartyHelper->display('form/bugSelector');
        } elseif ($_GET['action'] == 'getYearsToNow') {
            $team = TeamCache::getInstance()->getTeam(Tools::getSecureGETIntValue('teamid'));
            $min_year = date("Y", $team->getDate());
            $year = isset($_POST['year']) && $_POST['year'] > $min_year ? $_POST['year'] : $min_year;
            $smartyHelper->assign('years', SmartyTools::getYearsToNow($min_year, $year));
            $smartyHelper->display('form/yearSelector');
        } else {
            Tools::sendNotFoundAccess();
        }
    } else {
        if ($_POST['action']) {
            if ($_POST['action'] == 'updateBacklogAction') {
                $issue = IssueCache::getInstance()->getIssue(Tools::getSecurePOSTIntValue('bugid'));
                $issue->setBacklog(Tools::getSecurePOSTNumberValue('backlog'));
            } else {
                Tools::sendNotFoundAccess();
            }
        }
    }
} else {