Exemplo n.º 1
0
 /**
  * Retrieve the project trackers that can be used as planning trackers.
  * 
  * @param Planning $planning The planning for which we want to know the available trackers.
  * 
  * @return Array of Tracker
  */
 public function getAvailablePlanningTrackers(Planning $planning)
 {
     $planning_trackers = array($planning->getPlanningTracker());
     foreach ($this->dao->searchNonPlanningTrackersByGroupId($planning->getGroupId()) as $row) {
         $planning_trackers[] = $this->tracker_factory->getInstanceFromRow($row);
     }
     return $planning_trackers;
 }
Exemplo n.º 2
0
 /**
  * @param int $group_id the project id the trackers to retrieve belong to
  *
  * @return Array of Tracker
  */
 public function getAvailableBacklogTrackers(PFUser $user, $group_id)
 {
     $potential_planning_trackers = $this->getPotentialPlanningTrackerIds($user, $group_id);
     $backlog_trackers = array();
     foreach ($this->dao->searchNonPlanningTrackersByGroupId($group_id) as $row) {
         if (!in_array($row['id'], $potential_planning_trackers)) {
             $backlog_trackers[] = $this->tracker_factory->getInstanceFromRow($row);
         }
     }
     return $backlog_trackers;
 }