コード例 #1
0
ファイル: Project.php プロジェクト: pkdevboxy/thebuggenie
 protected function _populateWorkflowCount()
 {
     if ($this->_workflowstepcount === null) {
         $this->_workflowstepcount = array();
         $this->_workflowstepcount[0] = array('open' => 0, 'closed' => 0, 'percentage' => 0);
         foreach (WorkflowStep::getAllByWorkflowSchemeID($this->getWorkflowScheme()->getID()) as $workflow_step_id => $workflow_step) {
             $this->_workflowstepcount[$workflow_step_id] = array('open' => 0, 'closed' => 0, 'percentage' => 0);
         }
         foreach (tables\Issues::getTable()->getWorkflowStepCountByProjectID($this->getID()) as $workflow_step_id => $workflow_count) {
             $this->_workflowstepcount[$workflow_step_id] = $workflow_count;
         }
     }
 }
コード例 #2
0
ファイル: Components.php プロジェクト: pkdevboxy/thebuggenie
 public function componentDashboardViewProjectStatistics()
 {
     switch ($this->view->getType()) {
         case entities\DashboardView::VIEW_PROJECT_STATISTICS_PRIORITY:
             $counts = framework\Context::getCurrentProject()->getPriorityCount();
             $items = entities\Priority::getAll();
             $key = 'priority';
             break;
         case entities\DashboardView::VIEW_PROJECT_STATISTICS_SEVERITY:
             $counts = framework\Context::getCurrentProject()->getSeverityCount();
             $items = entities\Severity::getAll();
             $key = 'priority';
             break;
         case entities\DashboardView::VIEW_PROJECT_STATISTICS_CATEGORY:
             $counts = framework\Context::getCurrentProject()->getCategoryCount();
             $items = entities\Category::getAll();
             $key = 'category';
             break;
         case entities\DashboardView::VIEW_PROJECT_STATISTICS_RESOLUTION:
             $counts = framework\Context::getCurrentProject()->getResolutionCount();
             $items = entities\Resolution::getAll();
             $key = 'resolution';
             break;
         case entities\DashboardView::VIEW_PROJECT_STATISTICS_STATUS:
             $counts = framework\Context::getCurrentProject()->getStatusCount();
             $items = entities\Status::getAll();
             $key = 'status';
             break;
         case entities\DashboardView::VIEW_PROJECT_STATISTICS_WORKFLOW_STEP:
             $counts = framework\Context::getCurrentProject()->getWorkflowCount();
             $items = entities\WorkflowStep::getAllByWorkflowSchemeID(framework\Context::getCurrentProject()->getWorkflowScheme()->getID());
             $key = 'workflowstep';
             break;
         case entities\DashboardView::VIEW_PROJECT_STATISTICS_STATE:
             $counts = framework\Context::getCurrentProject()->getStateCount();
             $items = array('open' => $this->getI18n()->__('Open'), 'closed' => $this->getI18n()->__('Closed'));
             $key = 'state';
             break;
     }
     $this->counts = $counts;
     $this->key = $key;
     $this->items = $items;
 }