Beispiel #1
0
 /**
  * @param int $servicecontractid
  * @return mixed[]
  */
 private static function getContractTotalDetailedMgr($servicecontractid, $provDaysByType)
 {
     $detailledMgr = NULL;
     if (0 != $servicecontractid) {
         $contract = ServiceContractCache::getInstance()->getServiceContract($servicecontractid);
         $issueSelection = new IssueSelection("Total");
         // sidetasks
         $sidetasksPerCategory = $contract->getSidetasksPerCategoryType(true);
         foreach ($sidetasksPerCategory as $id => $iSel) {
             if (is_numeric($id) && Project::cat_st_inactivity == $id) {
                 continue;
             }
             $issueSelection->addIssueList($iSel->getIssueList());
         }
         // tasks
         $cmdsetsIssueSelection = $contract->getIssueSelection(CommandSet::type_general, Command::type_general);
         $issueSelection->addIssueList($cmdsetsIssueSelection->getIssueList());
         // provisions
         foreach ($provDaysByType as $nbDays) {
             $issueSelection->addProvision($nbDays);
         }
         #echo 'TotalSideTasks provision = '.$issueSelection->getProvision().'<br>';
         $detailledMgr = SmartyTools::getIssueSelectionDetailedMgr($issueSelection);
         $detailledMgr['name'] = $issueSelection->name;
     }
     return $detailledMgr;
 }
Beispiel #2
0
 /**
  * @param int $commandsetid
  * @param int $type Command::type_general
  * @return mixed[]
  */
 private static function getCommandSetDetailedMgr($commandsetid, $type)
 {
     $csetDetailedMgr = NULL;
     if (0 != $commandsetid) {
         $commandset = CommandSetCache::getInstance()->getCommandSet($commandsetid);
         $issueSelection = $commandset->getIssueSelection($type);
         $csetDetailedMgr = SmartyTools::getIssueSelectionDetailedMgr($issueSelection);
     }
     return $csetDetailedMgr;
 }