/**
  *
  * @param \PluginDataProviderInterface $pluginMgr
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION)) {
         $this->inputIssueSel = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     }
     // set default pluginSettings
 }
 /**
  *
  * @param \PluginDataProviderInterface $pluginDataProv
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION)) {
         $this->inputIssueSel = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_TEAM_ID)) {
         $this->teamid = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_TEAM_ID);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_TEAM_ID);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP)) {
         $this->startTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     } else {
         $this->startTimestamp = NULL;
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP)) {
         $this->endTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     } else {
         $this->endTimestamp = NULL;
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_PROJECT_ID)) {
         $this->selectedProject = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_PROJECT_ID);
     } else {
         $this->selectedProject = 'allSidetasksProjects';
     }
     // set default pluginSettings (not provided by the PluginDataProvider)
     $this->isDisplayTasks = false;
     $this->dateRange = 'defaultRange';
 }
 /**
  *
  * @param \PluginDataProviderInterface $pluginMgr
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION)) {
         $this->inputIssueSel = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP)) {
         $this->startTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP)) {
         $this->endTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     }
     if (!is_null($pluginDataProv->getParam(PluginDataProviderInterface::PARAM_PROVISION_DAYS))) {
         $this->provisionDays = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_PROVISION_DAYS);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_PROVISION_DAYS);
     }
     if (!is_null($pluginDataProv->getParam(PluginDataProviderInterface::PARAM_INTERVAL))) {
         // int value
         $this->interval = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_INTERVAL);
     } else {
         $this->interval = 30;
     }
     // set default pluginSettings (not provided by the PluginDataProvider)
 }
 /**
  *
  * @param \PluginDataProviderInterface $pluginMgr
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION)) {
         $this->inputIssueSel = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP)) {
         $this->startTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP)) {
         $this->endTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_INTERVAL)) {
         $this->interval = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_INTERVAL);
     } else {
         $this->interval = 30;
     }
     //self::$logger->debug('dataProvider '.PluginDataProviderInterface::PARAM_INTERVAL.'= '.$this->interval);
     // set default pluginSettings (not provided by the PluginDataProvider)
 }
 /**
  *
  * @param \PluginDataProviderInterface $pluginDataProv
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     //self::$logger->error("Params = ".var_export($pluginDataProv, true));
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION)) {
         $this->inputIssueSel = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP)) {
         $this->startTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP)) {
         $this->endTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_INTERVAL)) {
         $this->interval = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_INTERVAL);
     } else {
         $this->interval = 30;
     }
     //self::$logger->debug('dataProvider '.PluginDataProviderInterface::PARAM_INTERVAL.'= '.$this->interval);
 }
Esempio n. 6
0
 /**
  *
  * @param \PluginDataProviderInterface $pluginMgr
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     //self::$logger->error("Params = ".var_export($pluginDataProv, true));
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION)) {
         $this->inputIssueSel = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_TEAM_ID)) {
         $this->teamid = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_TEAM_ID);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_TEAM_ID);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP)) {
         $this->startTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     } else {
         $this->startTimestamp = NULL;
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP)) {
         $this->endTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     } else {
         $this->endTimestamp = NULL;
     }
     // set default pluginSettings (not provided by the PluginDataProvider)
     $this->dateRange = 'defaultRange';
     if (self::$logger->isDebugEnabled()) {
         self::$logger->debug("checkParams() ISel=" . $this->inputIssueSel->name . ' startTimestamp=' . $this->startTimestamp . ' endTimestamp=' . $this->endTimestamp);
     }
 }
 /**
  *
  * @param \PluginDataProviderInterface $pluginMgr
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION)) {
         $this->inputIssueSel = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     }
     $bugidList = array_keys($this->inputIssueSel->getIssueList());
     if (1 != count($bugidList)) {
         throw new Exception('There should be only one issue in IssueSelection !');
     }
     $bugid = current($bugidList);
     $this->issue = IssueCache::getInstance()->getIssue($bugid);
 }
 /**
  *
  * @param \PluginDataProviderInterface $pluginMgr
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION)) {
         $this->inputIssueSel = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP)) {
         $this->startTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP)) {
         $this->endTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_INTERVAL)) {
         $this->interval = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_INTERVAL);
     } else {
         $this->interval = 30;
     }
     $bugidList = array_keys($this->inputIssueSel->getIssueList());
     $this->formatedBugidList = implode(', ', $bugidList);
     if (empty($this->formatedBugidList)) {
         throw new Exception('No issues in IssueSelection !');
     }
     $this->bugResolvedStatusThreshold = Config::getInstance()->getValue(Config::id_bugResolvedStatusThreshold);
     // set default pluginSettings (not provided by the PluginDataProvider)
 }
 /**
  *
  * @param \PluginDataProviderInterface $pluginDataProv
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION)) {
         $this->inputIssueSel = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_TEAM_ID)) {
         $this->teamid = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_TEAM_ID);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_TEAM_ID);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_SESSION_USER_ID)) {
         $this->sessionUserid = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_SESSION_USER_ID);
     } else {
         $this->sessionUserid = 0;
     }
     try {
         $sessionUser = UserCache::getInstance()->getUser($this->sessionUserid);
         $this->isManager = $sessionUser->isTeamManager($this->teamid);
     } catch (Exception $e) {
         $this->isManager = NULL;
     }
     // set default pluginSettings (not provided by the PluginDataProvider)
     $this->isExtRef = false;
 }
Esempio n. 10
0
 /**
  *
  * @param \PluginDataProviderInterface $pluginDataProv
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION)) {
         $this->inputIssueSel = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_ISSUE_SELECTION);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_TEAM_ID)) {
         $this->teamid = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_TEAM_ID);
     } else {
         throw new Exception("Missing parameter: " . PluginDataProviderInterface::PARAM_TEAM_ID);
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP)) {
         $this->startTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     } else {
         $this->startTimestamp = NULL;
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP)) {
         $this->endTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     } else {
         $this->endTimestamp = NULL;
     }
     // set default pluginSettings (not provided by the PluginDataProvider)
     // if false, sidetasks (found in IssueSel) will be included in 'elapsed'
     // if true, sidetasks (found in IssueSel) will be displayed as 'sidetask'
     $this->showSidetasks = false;
     $this->dateRange = 'defaultRange';
     if (self::$logger->isDebugEnabled()) {
         self::$logger->debug("checkParams() ISel=" . $this->inputIssueSel->name . ' startTimestamp=' . $this->startTimestamp . ' endTimestamp=' . $this->endTimestamp);
     }
 }
 /**
  *
  * @param \PluginDataProviderInterface $pluginMgr
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     //self::$logger->error("Params = ".var_export($pluginDataProv, true));
     $weekDates = Tools::week_dates(date('W'), date('Y'));
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP)) {
         $this->startTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     } else {
         $this->startTimestamp = $weekDates[1];
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP)) {
         $this->endTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_END_TIMESTAMP);
     } else {
         $this->endTimestamp = $weekDates[5];
     }
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_TEAM_ID)) {
         $this->displayedTeam = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_TEAM_ID);
     } else {
         $this->displayedTeam = 0;
     }
     if (self::$logger->isDebugEnabled()) {
         self::$logger->debug("checkParams() startTimestamp=" . $this->startTimestamp);
     }
 }
Esempio n. 12
0
 /**
  *
  * @param \PluginDataProviderInterface $pluginMgr
  * @throws Exception
  */
 public function initialize(PluginDataProviderInterface $pluginDataProv)
 {
     //self::$logger->error("Params = ".var_export($pluginDataProv, true));
     if (NULL != $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP)) {
         $this->startTimestamp = $pluginDataProv->getParam(PluginDataProviderInterface::PARAM_START_TIMESTAMP);
     } else {
         $this->startTimestamp = time();
     }
     // set default pluginSettings (not provided by the PluginDataProvider)
     $this->isDateDisplayed = true;
     if (self::$logger->isDebugEnabled()) {
         self::$logger->debug("checkParams() startTimestamp=" . $this->startTimestamp);
     }
 }