Пример #1
0
 private function bug_trackers($repositories_table)
 {
     $tracker_id_to_repositories = array();
     $tracker_repositories_table = $this->db->fetch_table('tracker_repositories');
     if ($tracker_repositories_table) {
         foreach ($tracker_repositories_table as $row) {
             array_push(array_ensure_item_has_array($tracker_id_to_repositories, $row['tracrepo_tracker']), $row['tracrepo_repository']);
         }
     }
     $bug_trackers = array();
     $bug_trackers_table = $this->db->fetch_table('bug_trackers');
     if ($bug_trackers_table) {
         foreach ($bug_trackers_table as $row) {
             $bug_trackers[$row['tracker_id']] = array('name' => $row['tracker_name'], 'bugUrl' => $row['tracker_bug_url'], 'newBugUrl' => $row['tracker_new_bug_url'], 'repositories' => $tracker_id_to_repositories[$row['tracker_id']]);
         }
     }
     return $bug_trackers;
 }
Пример #2
0
 function add_values_for_aggregation($parent_id, $test_name, $metric_name, $config_type, $values, $aggregator = NULL)
 {
     $value_list =& array_ensure_item_has_array(array_ensure_item_has_array(array_ensure_item_has_array(array_ensure_item_has_array($this->parent_to_values, strval($parent_id)), $metric_name), $config_type), $test_name);
     array_push($value_list, array('aggregator' => $aggregator, 'values' => $values));
 }
 function fetch_commits()
 {
     $query = $this->db->query('SELECT commit_id, commit_build, commit_repository, commit_revision, commit_time
         FROM commits, build_commits, build_requests, analysis_test_groups
         WHERE commit_id = build_commit AND commit_build = request_build
             AND request_group = testgroup_id AND testgroup_task = $1', array($this->task_id));
     while ($row = $this->db->fetch_next_row($query)) {
         $commit_time = Database::to_js_time($row['commit_time']);
         array_push(array_ensure_item_has_array($this->build_to_commits, $row['commit_build']), array($row['commit_id'], $row['commit_repository'], $row['commit_revision'], $commit_time));
     }
 }