| <?php |
| /******************************************************************************** |
| * Copyright (c) 2018 The Eclipse Foundation |
| * |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License v. 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-2.0. |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| ********************************************************************************/ |
| require_once dirname ( __FILE__ ) . '/../charts.inc'; |
| function chart_ip_cq_by_project_open(ChartContext $context) { |
| return ChartBuilder::named ( 'ip_cq_by_project_open' ) |
| ->title ( "Open CQs by Project as of :date" ) |
| ->description ( "CQs that are currently open." ) |
| ->query ('ipzilla', " |
| select |
| c.name as project, |
| count(distinct b.bug_id) as count |
| from bugs as b |
| join components as c on b.component_id=c.id |
| join keywords as k on b.bug_id=k.bug_id |
| join keyworddefs as kd on k.keywordid=kd.id |
| and kd.name in ('projectcode','thirdparty') |
| where |
| b.short_desc not regexp '\((Orbit|PB( Orbit)?|ATO)\s*\d*\)' |
| and c.name not in ('IP_Discussion') |
| and b.bug_status in ('NEW', 'REOPENED') |
| group by project |
| order by count desc |
| " ) |
| ->pieChart() |
| ->substitute ( ':date', date('Y-m-d') ) |
| ->column ( 'Project', 'project', 'string') |
| ->column ( 'Count', 'count', 'number' ); |
| } |
| ?> |