本文整理汇总了PHP中getFilter函数的典型用法代码示例。如果您正苦于以下问题:PHP getFilter函数的具体用法?PHP getFilter怎么用?PHP getFilter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getFilter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_otd_bi
/**
* Gets the collection of data for the OTD graph of database for the selected period.
*
* @param int $selectedPeriod period selected for display.
*
* @return array Information relevant to the OTD graph.
*
*/
public function get_otd_bi($selected_period = "x")
{
$this->db_tickets = $this->load->database('oracle', TRUE);
$sql = $sql = "SELECT TARGET_RELEASE,\n\t\tTO_CHAR(SCHED_FINISH_DATE, 'YYYY/MM') as ByYearMonth,\n\t\tSUM(CASE WHEN ACTUAL_FINISH_DATE <= SCHED_FINISH_DATE THEN 1 ELSE 0 END) AS PASSED,\n\t\tSUM(CASE WHEN ACTUAL_FINISH_DATE > SCHED_FINISH_DATE THEN 1 ELSE 0 END) AS NOT_PASSED,\n\t\tcount (*) as TOTAL,\n\t\tROUND (((SUM(CASE WHEN ACTUAL_FINISH_DATE <= SCHED_FINISH_DATE THEN 1 ELSE 0 END) * 100) / count (*) )) as AVERG\n\t\t FROM vw_24fitness_all_tickets \n\t\tWHERE IT_GROUP='BI' AND \n\t\tTARGET_RELEASE IS NOT NULL AND\n\t\tACTUAL_FINISH_DATE IS NOT NULL AND\n\t\tSCHED_FINISH_DATE IS NOT NULL AND \n\t\tSCHED_FINISH_DATE between to_date (?, 'yyyy/mm/dd') AND \n\t\tto_date (?, 'yyyy/mm/dd')\n\t\tGROUP BY TO_CHAR(SCHED_FINISH_DATE, 'YYYY/MM'), TARGET_RELEASE \n\t\tORDER BY ByYearMonth";
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例2: get_estimation_variance_detailed_data
/**
* Gets a collection of data relevant to each point of the graph, to show details of each ticket.
*
* @param int $selectedPeriod period selected for display.
* @param String $assigned_to User to show detail.
*
* @return array Information relevant to the Estimation Variance graph.
*
*/
public function get_estimation_variance_detailed_data($selected_period = "x", $assigned_to)
{
$this->db_tickets = $this->load->database('oracle', TRUE);
if ($selected_period == 'year') {
//This is to rename the names of the months by digit, for the search in the query.
$assigned_to == 'JANUARY' ? $month = 1 : '';
$assigned_to == 'FEBRUARY' ? $month = 2 : '';
$assigned_to == 'MARCH' ? $month = 3 : '';
$assigned_to == 'APRIL' ? $month = 4 : '';
$assigned_to == 'MAY' ? $month = 5 : '';
$assigned_to == 'JUNE' ? $month = 6 : '';
$assigned_to == 'JULY' ? $month = 7 : '';
$assigned_to == 'AUGUST' ? $month = 8 : '';
$assigned_to == 'SEPTEMBER' ? $month = 9 : '';
$assigned_to == 'OCTOBER' ? $month = 10 : '';
$assigned_to == 'NOVEMBER' ? $month = 11 : '';
$assigned_to == 'DECEMBER' ? $month = 12 : '';
$sql = "SELECT ticket_id, ASSIGNED_TO, title, actual_effort, estimated_fix_time, round((ACTUAL_EFFORT / ESTIMATED_FIX_TIME),2) as DIVISION, prod_deployment_date \n\t\t\tFROM vw_24fitness_all_tickets WHERE \n\t\t\tIT_GROUP='BI' AND prod_deployment_date between \n\t\t\tto_date (?, 'yyyy/mm/dd') AND to_date (?, 'yyyy/mm/dd') and EXTRACT(MONTH FROM prod_deployment_date)=" . $month . " ORDER BY ASSIGNED_TO";
} else {
$sql = "SELECT ticket_id, ASSIGNED_TO, title, actual_effort, estimated_fix_time, round((ACTUAL_EFFORT / ESTIMATED_FIX_TIME),2) as DIVISION, prod_deployment_date ";
$sql .= "FROM vw_24fitness_all_tickets WHERE ";
$sql .= "IT_GROUP='BI' AND prod_deployment_date between ";
$sql .= "to_date (?, 'yyyy/mm/dd') AND to_date (?, 'yyyy/mm/dd') and assigned_to='" . $assigned_to . "' ORDER BY ASSIGNED_TO";
}
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例3: widget_goods
/**
* ShopEx licence
*
* @copyright Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
* @license http://ecos.shopex.com/license/gpl GPL License
*/
function widget_goods(&$setting, &$render)
{
$limit = intval($setting['limit']) > 0 ? intval($setting['limit']) : 6;
$goods =& app::get('b2c')->model('goods');
$goods->defaultCols = 'bn,name,cat_id,price,store,marketable,brand_id,weight,d_order,uptime,type_id';
$goods->appendCols = 'goods_id,thumbnail_pic,brief,mktprice,image_default_id';
$config = app::get('b2c')->getConf('site.save_price');
$data['onSelect'] = $setting['onSelect'] ? $setting['onSelect'] : 0;
$setting['max_length'] = $setting['max_length'] ? $setting['max_length'] : 35;
$setting['view'] = app::get('b2c')->getConf('gallery.default_view');
$imageDefault = app::get('image')->getConf('image.set');
$search =& app::get('b2c')->model('search');
$setting['str'] = $search->encode($filter);
$setting['restrict'] = $setting['restrict'] ? $setting['restrict'] : 'on';
$order = $setting['goods_orderby'] ? orderBy($setting['goods_orderby']) : null;
if ($setting['columNum'] > 1) {
for ($i = 0; $i < $setting['columNum']; $i++) {
parse_str($setting['adjunct']['items'][$i], $filter[$i]);
$filter[$i] = getFilter($filter[$i]);
$result['link'][$i - 1] =& kernel::router()->gen_url(array('app' => 'b2c', 'ctl' => 'gallery', 'act' => $setting['view'], 'args' => array($str_cat_id, $search->encode($filter[$i]), $setting['goods_orderby'] ? $setting['goods_orderby'] : 0)));
$result['goods'][] = $goods->getList(null, $filter[$i], 0, $limit, $order['sql']);
$result['defaultImage'] = $imageDefault['S']['default_image'];
unset($filter[$i]);
}
return $result;
} else {
parse_str($setting['adjunct']['items'][0], $filter);
$filter = getFilter($filter);
$result['link'] =& kernel::router()->gen_url(array('app' => 'b2c', 'ctl' => 'site_gallery', 'act' => $setting['view'], 'args' => array(implode(",", (array) $filter['cat_id']), $search->encode($filter), $setting['goods_orderby'] ? $setting['goods_orderby'] : 0)));
$result['goods'] = $goods->getList('*', $filter, 0, $limit, $order['sql']);
$result['defaultImage'] = $imageDefault['S']['default_image'];
return $result;
}
}
示例4: get_defect_rate_detailed_data
/**
* Gets a collection of data relevant to each point of the graph, to show details of each ticket.
*
* @param int $selectedPeriod period selected for display.
* @param String $application Application to show detail..
* @param String $target_release Target Release to show detail.
*
* @return array Information relevant to the Defect Rate graph.
*
*/
public function get_defect_rate_detailed_data($selected_period = "x", $application, $target_release)
{
$this->db_tickets = $this->load->database('oracle', TRUE);
if ($selected_period == 'year') {
//This is to rename the names of the months by digit, for the search in the query.
$target_release == 'JANUARY' ? $month = 1 : '';
$target_release == 'FEBRUARY' ? $month = 2 : '';
$target_release == 'MARCH' ? $month = 3 : '';
$target_release == 'APRIL' ? $month = 4 : '';
$target_release == 'MAY' ? $month = 5 : '';
$target_release == 'JUNE' ? $month = 6 : '';
$target_release == 'JULY' ? $month = 7 : '';
$target_release == 'AUGUST' ? $month = 8 : '';
$target_release == 'SEPTEMBER' ? $month = 9 : '';
$target_release == 'OCTOBER' ? $month = 10 : '';
$target_release == 'NOVEMBER' ? $month = 11 : '';
$target_release == 'DECEMBER' ? $month = 12 : '';
$sql = "SELECT ticket_id, title, APPLICATION, TARGET_RELEASE, SUM(CASE WHEN TYPE_24FITNESS = 'Defect' THEN 1 ELSE 0 END) AS DEFECTS, \n\t\t\tSUM(CASE WHEN TYPE_24FITNESS = 'Defect' OR TYPE_24FITNESS = 'Requirement' THEN 1 ELSE 0 END) AS TASKS, PROD_DEPLOYMENT_DATE \n\t\t\tFROM vw_24fitness_all_tickets where PROD_DEPLOYMENT_DATE between to_date (?, 'yyyy/mm/dd') AND \n\t\t\tto_date (?, 'yyyy/mm/dd') and EXTRACT(MONTH FROM PROD_DEPLOYMENT_DATE)=" . $month . " and it_group='BI' \n\t\t\tgroup by ticket_id , APPLICATION, TARGET_RELEASE, PROD_DEPLOYMENT_DATE, title order by prod_deployment_date";
} else {
$sql = "SELECT ticket_id, title, APPLICATION, TARGET_RELEASE, SUM(CASE WHEN TYPE_24FITNESS = 'Defect' THEN 1 ELSE 0 END) AS DEFECTS, ";
$sql .= "SUM(CASE WHEN TYPE_24FITNESS = 'Defect' OR TYPE_24FITNESS = 'Requirement' THEN 1 ELSE 0 END) AS TASKS, PROD_DEPLOYMENT_DATE ";
$sql .= "FROM vw_24fitness_all_tickets where PROD_DEPLOYMENT_DATE between to_date (?, 'yyyy/mm/dd') AND ";
$sql .= "to_date (?, 'yyyy/mm/dd') and application='" . $application . "' and target_release='" . $target_release . "' and it_group='BI' ";
$sql .= "group by ticket_id , APPLICATION, TARGET_RELEASE, PROD_DEPLOYMENT_DATE, title order by application, target_release ";
}
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例5: get_number_of_cycles_detailed_data
/**
* Gets a collection of data relevant to each point of the graph, to show details of each ticket.
*
* @param int $selectedPeriod period selected for display.
* @param String $application Application to show detail.
* @param String $target_release Target Release to show detail.
*
* @return array Information relevant to the Number of Cycles graph.
*
*/
public function get_number_of_cycles_detailed_data($selected_period = "x", $application, $target_release)
{
$this->db_tickets = $this->load->database('oracle', TRUE);
if ($selected_period == 'year') {
//This is to rename the names of the months by digit, for the search in the query.
$target_release == 'JANUARY' ? $month = 1 : '';
$target_release == 'FEBRUARY' ? $month = 2 : '';
$target_release == 'MARCH' ? $month = 3 : '';
$target_release == 'APRIL' ? $month = 4 : '';
$target_release == 'MAY' ? $month = 5 : '';
$target_release == 'JUNE' ? $month = 6 : '';
$target_release == 'JULY' ? $month = 7 : '';
$target_release == 'AUGUST' ? $month = 8 : '';
$target_release == 'SEPTEMBER' ? $month = 9 : '';
$target_release == 'OCTOBER' ? $month = 10 : '';
$target_release == 'NOVEMBER' ? $month = 11 : '';
$target_release == 'DECEMBER' ? $month = 12 : '';
$sql = "SELECT TICKET_ID, TITLE, APPLICATION, TARGET_RELEASE, TARGET_CYCLE \n\t\t\tFROM vw_24fitness_all_tickets \n\t\t\tWHERE PROD_DEPLOYMENT_DATE between to_date (?, 'yyyy/mm/dd') AND \n\t\t\tto_date (?, 'yyyy/mm/dd') and it_group='DEV'\n\t\t\tand EXTRACT(MONTH FROM PROD_DEPLOYMENT_DATE)=" . $month . "\n\t\t\tORDER BY APPLICATION, TARGET_RELEASE, TARGET_CYCLE";
} else {
$sql = "SELECT TICKET_ID, TITLE, APPLICATION, TARGET_RELEASE, TARGET_CYCLE ";
$sql .= "FROM vw_24fitness_all_tickets ";
$sql .= "WHERE ";
$sql .= "APPLICATION = '" . $application . "' AND ";
$sql .= "TARGET_RELEASE = '" . $target_release . "' AND ";
$sql .= "PROD_DEPLOYMENT_DATE between to_date (?, 'yyyy/mm/dd') AND ";
$sql .= "to_date (?, 'yyyy/mm/dd') and it_group='DEV' ";
$sql .= "ORDER BY APPLICATION, TARGET_RELEASE, TARGET_CYCLE ";
}
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例6: get_series
public function get_series($selected_period = "x")
{
$series_data = NULL;
$period = getFilter($selected_period);
$query = $this->db->get_where('survey', array('period >=' => $period['start_date'], 'period <' => $period['end_date'], 'survey_type_id' => 2));
$survey_id = $query->result();
if ($survey_id != NULL) {
for ($i = 0; $i < count($survey_id); $i++) {
$query = $this->db->get_where('survey_question', array('survey_id' => $survey_id[$i]->id));
$survey[] = $query->result();
for ($j = 0; $j < count($this->get_questions()); $j++) {
if ($i == 0) {
if ($survey[0][$j]->answer_types_id != NULL) {
$MAX[] = $MIN[] = (int) $survey[0][$j]->answer_types_id;
$AVG[] = (double) $survey[0][$j]->answer_types_id;
}
} else {
if ($survey[$i][$j]->answer_types_id != NULL) {
$MAX[$j] < $survey[$i][$j]->answer_types_id ? $MAX[$j] = (int) $survey[$i][$j]->answer_types_id : (int) $MAX[$j];
$MIN[$j] > $survey[$i][$j]->answer_types_id ? $MIN[$j] = (int) $survey[$i][$j]->answer_types_id : (int) $MIN[$j];
$AVG[$j] += $survey[$i][$j]->answer_types_id;
if (count($survey_id) - 1 == $i) {
$AVG[$j] = (double) ($AVG[$j] / count($survey_id));
}
}
}
}
}
$series_data[] = array('name' => 'Max', 'data' => $MAX);
$series_data[] = array('name' => 'Average', 'data' => $AVG);
$series_data[] = array('name' => 'Min', 'data' => $MIN);
}
return $series_data;
}
示例7: get_utilization_detailed_data
/**
* Gets a collection of data relevant to each point of the graph, to show details of each ticket.
*
* @param int $selectedPeriod period selected for display.
* @param String $assigned_to User to show detail.
*
* @return array Information relevant to the Utilization graph.
*
*/
public function get_utilization_detailed_data($selected_period = "x", $assigned_to)
{
$this->db_tickets = $this->load->database('oracle', TRUE);
if ($selected_period == 'year') {
//This is to rename the names of the months by digit, for the search in the query.
$assigned_to == 'JANUARY' ? $month = 1 : '';
$assigned_to == 'FEBRUARY' ? $month = 2 : '';
$assigned_to == 'MARCH' ? $month = 3 : '';
$assigned_to == 'APRIL' ? $month = 4 : '';
$assigned_to == 'MAY' ? $month = 5 : '';
$assigned_to == 'JUNE' ? $month = 6 : '';
$assigned_to == 'JULY' ? $month = 7 : '';
$assigned_to == 'AUGUST' ? $month = 8 : '';
$assigned_to == 'SEPTEMBER' ? $month = 9 : '';
$assigned_to == 'OCTOBER' ? $month = 10 : '';
$assigned_to == 'NOVEMBER' ? $month = 11 : '';
$assigned_to == 'DECEMBER' ? $month = 12 : '';
$sql = "SELECT ticket_id, ASSIGNED_TO, title, IT_GROUP, ACTUAL_EFFORT, actual_finish_date \n\t\t\tFROM vw_24fitness_all_tickets \n\t\t\tWHERE (actual_finish_date between to_date (?, 'yyyy/mm/dd') AND to_date (?, 'yyyy/mm/dd')) AND IT_GROUP = 'DEV' \n\t\t\tand EXTRACT(MONTH FROM actual_finish_date)=" . $month . " order by actual_finish_date";
} else {
$sql = "SELECT ticket_id, ASSIGNED_TO, title, IT_GROUP, ACTUAL_EFFORT, actual_finish_date ";
$sql .= "FROM vw_24fitness_all_tickets ";
$sql .= "WHERE (actual_finish_date between to_date (?, 'yyyy/mm/dd') AND to_date (?, 'yyyy/mm/dd')) AND IT_GROUP = 'DEV' ";
$sql .= "and ASSIGNED_TO = '" . $assigned_to . "' order by assigned_to";
}
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例8: get_defect_rate_detailed_data
public function get_defect_rate_detailed_data($selected_period = "x", $application, $target_release)
{
$this->db_tickets = $this->load->database('oracle', TRUE);
$sql = "SELECT ticket_id, title, APPLICATION, TARGET_RELEASE, SUM(CASE WHEN TYPE_24FITNESS = 'Defect' THEN 1 ELSE 0 END) AS DEFECTS, ";
$sql .= "SUM(CASE WHEN TYPE_24FITNESS = 'Defect' OR TYPE_24FITNESS = 'Requirement' THEN 1 ELSE 0 END) AS TASKS, PROD_DEPLOYMENT_DATE ";
$sql .= "FROM vw_24fitness_all_tickets where PROD_DEPLOYMENT_DATE between to_date (?, 'yyyy/mm/dd') AND ";
$sql .= "to_date (?, 'yyyy/mm/dd') and application='" . $application . "' and target_release='" . $target_release . "' ";
$sql .= "group by ticket_id , APPLICATION, TARGET_RELEASE, PROD_DEPLOYMENT_DATE, title order by application, target_release ";
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例9: get_efficiency_detailed_data
public function get_efficiency_detailed_data($selected_period = "x", $assigned_to)
{
$this->db_tickets = $this->load->database('oracle', TRUE);
$sql = "SELECT ticket_id , ASSIGNED_TO, title, IT_GROUP, actual_effort, SCHED_FINISH_DATE ";
$sql .= "FROM vw_24fitness_all_tickets WHERE IT_GROUP = 'DEV' and ";
$sql .= "ACTUAL_EFFORT is not null and SCHED_FINISH_DATE between ";
$sql .= "to_date (?, 'yyyy/mm/dd') AND to_date (?, 'yyyy/mm/dd') and assigned_to='" . $assigned_to . "' ";
$sql .= "GROUP BY ticket_id, actual_effort, assigned_to, IT_GROUP, title, SCHED_FINISH_DATE ";
$sql .= "ORDER BY assigned_to";
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例10: get_total_effort_detailed_data
/**
* Gets a collection of data relevant to each point of the graph, to show details of each ticket.
*
* @param int $selectedPeriod period selected for display.
* @param String $application Application to show detail..
* @param String $target_release Target Release to show detail.
*
* @return array Information relevant to the Total Effort graph.
*
*/
public function get_total_effort_detailed_data($selected_period = "x", $application, $target_release)
{
$this->db_tickets = $this->load->database('oracle', TRUE);
$sql = "SELECT ticket_id, TITLE, APPLICATION, TARGET_RELEASE,SUM(ESTIMATED_FIX_TIME) as TOTAL_EFFORT, ";
$sql .= "PROD_DEPLOYMENT_DATE FROM vw_24fitness_all_tickets ";
$sql .= "where PROD_DEPLOYMENT_DATE between to_date (?, 'yyyy/mm/dd') AND to_date (?, 'yyyy/mm/dd') ";
$sql .= "AND target_release='" . $target_release . "' and application='" . $application . "' ";
$sql .= "GROUP BY ticket_id, TITLE, PROD_DEPLOYMENT_DATE, APPLICATION, TARGET_RELEASE ";
$sql .= "ORDER BY target_release";
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例11: get_defect_leakage_detailed_data
/**
* Gets a collection of data relevant to each point of the graph, to show details of each ticket.
*
* @param int $selectedPeriod period selected for display.
* @param String $application Application to show detail..
* @param String $target_release Target Release to show detail.
*
* @return array Information relevant to the Defect Leakage and Defect Removal Rate graph.
*
*/
public function get_defect_leakage_detailed_data($selected_period = "x", $application, $target_release)
{
$this->db_tickets = $this->load->database('oracle', TRUE);
$sql = "SELECT ticket_id, title, APPLICATION, TARGET_RELEASE, prod_deployment_date, ";
$sql .= "SUM(CASE WHEN TYPE_24FITNESS = 'Defect' AND (test_env like '%QA%' or test_env like '%ALL%') THEN 1 ELSE 0 END) AS DEFECT_QA, ";
$sql .= "SUM(CASE WHEN TYPE_24FITNESS = 'Defect' AND (test_env like '%Prod%' or test_env like '%ALL%') THEN 1 ELSE 0 END) AS DEFECT_PROD ";
$sql .= "FROM vw_24fitness_all_tickets ";
$sql .= "WHERE (TYPE_24FITNESS = 'Defect' AND (test_env like '%QA%' or test_env like '%ALL%') OR TYPE_24FITNESS = 'Defect' AND (test_env like '%Prod%' or test_env like '%ALL%') AND ";
$sql .= "prod_deployment_date between to_date (?, 'yyyy/mm/dd') AND ";
$sql .= "to_date (?, 'yyyy/mm/dd')) AND target_release='" . $target_release . "' and application='" . $application . "' GROUP BY TYPE_24FITNESS, test_env, APPLICATION, TARGET_RELEASE, ticket_id, title, prod_deployment_date ";
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例12: get_defect_leakage_detailed_data
public function get_defect_leakage_detailed_data($selected_period = "x", $application, $target_release)
{
$this->db_tickets = $this->load->database('oracle', TRUE);
$sql = "SELECT ticket_id, title, APPLICATION, TARGET_RELEASE, PROD_DEPLOYMENT_DATE, ";
$sql .= "SUM(CASE WHEN TYPE_24FITNESS = 'Defect' AND IT_GROUP = 'QA' THEN 1 ELSE 0 END) AS DEFECT_QA, ";
$sql .= "SUM(CASE WHEN TYPE_24FITNESS = 'Defect' AND IT_GROUP = 'DEV' THEN 1 ELSE 0 END) AS DEFECT_PROD ";
$sql .= "FROM vw_24fitness_all_tickets ";
$sql .= "WHERE (TYPE_24FITNESS = 'Defect' and IT_GROUP = 'QA' OR TYPE_24FITNESS = 'Defect' AND IT_GROUP = 'DEV' AND ";
$sql .= "TARGET_RELEASE <> 'NULL' AND ";
$sql .= "PROD_DEPLOYMENT_DATE between to_date (?, 'yyyy/mm/dd') AND ";
$sql .= "to_date (?, 'yyyy/mm/dd')) AND target_release='" . $target_release . "' and application='" . $application . "' GROUP BY TYPE_24FITNESS, IT_GROUP, APPLICATION, TARGET_RELEASE, ticket_id, title, PROD_DEPLOYMENT_DATE ";
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例13: get_estimation_variance
public function get_estimation_variance($selected_period = "x")
{
$this->db_tickets = $this->load->database('oracle', TRUE);
$sql = "SELECT ASSIGNED_TO, ROUND(AVG((ACTUAL_EFFORT / ESTIMATED_FIX_TIME)),2) as ESTIMATION_VARIANCE ";
$sql .= "FROM vw_24fitness_all_tickets ";
$sql .= "WHERE ";
$sql .= "ACTUAL_EFFORT IS NOT NULL AND ";
$sql .= "ACTUAL_EFFORT !=0 AND ";
$sql .= "ESTIMATED_FIX_TIME IS NOT NULL AND ";
$sql .= "ESTIMATED_FIX_TIME !=0 AND ";
$sql .= "IT_GROUP='BI' AND ";
$sql .= "SCHED_FINISH_DATE IS NOT NULL AND ";
$sql .= "SCHED_FINISH_DATE between to_date (?, 'yyyy/mm/dd') AND ";
$sql .= "to_date (?, 'yyyy/mm/dd') ";
$sql .= "GROUP BY ASSIGNED_TO ";
$sql .= "ORDER BY ASSIGNED_TO";
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例14: get_release_size_detailed_data
/**
* Gets a collection of data relevant to each point of the graph, to show details of each ticket.
*
* @param int $selectedPeriod period selected for display.
* @param String $application Application to show detail..
* @param String $target_release Target Release to show detail.
*
* @return array Information relevant to the Release Size graph.
*
*/
public function get_release_size_detailed_data($selected_period = "x", $application, $target_release)
{
$this->db_tickets = $this->load->database('oracle', TRUE);
if ($selected_period == 'year') {
//This is to rename the names of the months by digit, for the search in the query.
$target_release == 'JANUARY' ? $month = 1 : '';
$target_release == 'FEBRUARY' ? $month = 2 : '';
$target_release == 'MARCH' ? $month = 3 : '';
$target_release == 'APRIL' ? $month = 4 : '';
$target_release == 'MAY' ? $month = 5 : '';
$target_release == 'JUNE' ? $month = 6 : '';
$target_release == 'JULY' ? $month = 7 : '';
$target_release == 'AUGUST' ? $month = 8 : '';
$target_release == 'SEPTEMBER' ? $month = 9 : '';
$target_release == 'OCTOBER' ? $month = 10 : '';
$target_release == 'NOVEMBER' ? $month = 11 : '';
$target_release == 'DECEMBER' ? $month = 12 : '';
$sql = "SELECT TICKET_ID, TITLE, APPLICATION, TARGET_RELEASE, assigned_to, PROD_DEPLOYMENT_DATE, SUM(actual_effort) as Release_Size \n\t\t\tFROM vw_24fitness_all_tickets \n\t\t\tWHERE PROD_DEPLOYMENT_DATE between to_date (?, 'yyyy/mm/dd') AND \n\t\t\tto_date (?, 'yyyy/mm/dd') and it_group='BI'\n\t\t\tand EXTRACT(MONTH FROM PROD_DEPLOYMENT_DATE)=" . $month . "\n \t\tGROUP BY ticket_id, TITLE, PROD_DEPLOYMENT_DATE, APPLICATION, TARGET_RELEASE, assigned_to, it_group";
} else {
$sql = "SELECT ticket_id, title, application, target_release, assigned_to, PROD_DEPLOYMENT_DATE,\n\t\t\tit_group, SUM(actual_effort) as Release_Size, \n\t\t\tTO_CHAR(PROD_DEPLOYMENT_DATE, 'YYYY/MM') as ByYearMonth \n\t\t\tFROM vw_24fitness_all_tickets where PROD_DEPLOYMENT_DATE between to_date (?, 'yyyy/mm/dd') AND \n\t\t\tto_date (?, 'yyyy/mm/dd') and it_group='BI' AND target_release='" . $target_release . "' and \n\t\t\tapplication='" . $application . "'\n\t\t\tGROUP BY ticket_id, TITLE, PROD_DEPLOYMENT_DATE, APPLICATION, TARGET_RELEASE, assigned_to, it_group";
}
$query = $this->db_tickets->query($sql, getFilter($selected_period));
return $query->result();
}
示例15: getExpert
<?php
if (isset($_GET["expert"])) {
$expertName = $_GET["expert"];
$expert = getExpert($expertName);
$expert = $expert->speaker;
} else {
$experts = array();
$currPage = isset($_GET["p"]) ? $_GET["p"] : 1;
$keyword = isset($_GET["q"]) ? $_GET["q"] : "";
$availability = isset($_GET["a"]) ? $_GET["a"] : "";
$industry = isset($_GET["i"]) ? $_GET["i"] : "";
$sort = isset($_GET["s"]) ? $_GET["s"] : "name";
$pagesize = isset($_GET["n"]) ? $_GET["n"] : 10;
$responseData = getResults($currPage, $keyword, $availability, $industry, $sort, $pagesize);
$filters = getFilter($currPage, $keyword, $availability, $industry, $sort, $pagesize);
$pagination = buildPagination($currPage, $responseData->total, $pagesize);
$searchDetail = getSearchInfo($currPage, $responseData->total, $pagesize);
$filterArray = array();
if ($sort !== 'name') {
$filterArray[] = 's=' . $sort;
}
if ($pagesize !== 10) {
$filterArray[] = 'n=' . $pagesize;
}
if (!empty($filterArray)) {
$filterString = implode('&', $filterArray);
}
$filter_availability = $availability;
$filter_industry = $industry;
$filter_keyword = $keyword;