* Add where with 'vision = or'.
This commit is contained in:
@@ -32,6 +32,7 @@ class rate_of_approved_story_in_product extends baseCalc
|
||||
->andWhere('t3.deleted')->eq(0)
|
||||
->andWhere('t2.type')->eq('story')
|
||||
->andWhere('t3.shadow')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t2.vision)")
|
||||
->groupBy('t2.product')
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ class bug_concentration_of_developed_story_in_product extends baseCalc
|
||||
$developedStory = $this->dao->select('product, count(id) AS storyNum')
|
||||
->from(TABLE_STORY)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere("NOT FIND_IN_SET('or', vision)")
|
||||
->andWhere('stage', true)->in('developed,testing,tested,verified,released')
|
||||
->orWhere('closedReason')->eq('done')
|
||||
->markRight(1)
|
||||
|
||||
@@ -33,6 +33,7 @@ class case_coverage_of_projected_story_in_product extends baseCalc
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ class count_of_delivered_story_in_product extends baseCalc
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->andWhere('t1.stage', true)->eq('released')
|
||||
->orWhere('t1.closedReason')->eq('done')
|
||||
->markRight(1)
|
||||
|
||||
@@ -30,6 +30,7 @@ class count_of_developed_story_in_product extends baseCalc
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere('t1.type')->eq('story')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->andWhere('t1.stage', true)->in('developed,testing,tested,verified,released')
|
||||
->orWhere('t1.closedReason')->eq('done')
|
||||
->markRight(1)
|
||||
|
||||
@@ -31,6 +31,7 @@ class count_of_invalid_story_in_product extends baseCalc
|
||||
->andWhere('t1.type')->eq('story')
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere('t1.closedReason')->in('duplicate,willnotdo,bydesign,cancel')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->groupBy('t1.product')
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class count_of_projected_story_in_product extends baseCalc
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id')
|
||||
->where('t2.deleted')->eq('0')
|
||||
->andWhere('t3.deleted')->eq('0')
|
||||
->andWhere("NOT FIND_IN_SET('or', t2.vision)")
|
||||
->groupBy('t1.product');
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ class count_of_projected_story_with_case_in_product extends baseCalc
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id')
|
||||
->where('t2.deleted')->eq('0')
|
||||
->andWhere('t3.deleted')->eq('0')
|
||||
->andWhere("NOT FIND_IN_SET('or', t2.vision)")
|
||||
->groupBy('t1.product');
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ class count_of_valid_story_in_product extends baseCalc
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere('t1.type')->eq('story')
|
||||
->andWhere('t1.closedReason')->notin('duplicate,willnotdo,bydesign,cancel')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ class ac_of_all_in_waterfall extends baseCalc
|
||||
->where('t3.deleted')->eq('0')
|
||||
->andWhere('t3.type')->eq('project')
|
||||
->andWhere('t3.model')->eq('waterfall')
|
||||
->andWhere("NOT FIND_IN_SET('or', t3.vision)")
|
||||
->groupBy('t3.id')
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ class consume_of_all_in_project extends baseCalc
|
||||
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t2.project=t3.id')
|
||||
->where('t3.deleted')->eq('0')
|
||||
->andWhere('t3.type')->eq('project')
|
||||
->andWhere("NOT FIND_IN_SET('or', t3.vision)")
|
||||
->groupBy('t3.id')
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ class day_of_invested_in_project extends baseCalc
|
||||
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t2.project=t3.id')
|
||||
->where('t3.deleted')->eq('0')
|
||||
->andWhere('t3.type')->eq('project')
|
||||
->andWhere("NOT FIND_IN_SET('or', t3.vision)")
|
||||
->groupBy('t3.id')
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class ev_of_finished_task_in_waterfall extends baseCalc
|
||||
->from(TABLE_TASK)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('parent')->ne('-1')
|
||||
->andWhere("NOT FIND_IN_SET('or', vision)")
|
||||
->andWhere('status', true)->in('done,closed')
|
||||
->orWhere('closedReason')->eq('done')
|
||||
->markRight(1)
|
||||
@@ -42,6 +43,7 @@ class ev_of_finished_task_in_waterfall extends baseCalc
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.type')->eq('project')
|
||||
->andWhere('t1.model')->eq('waterfall')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ class pv_of_task_in_waterfall extends baseCalc
|
||||
->from(TABLE_TASK)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('parent')->ne('-1')
|
||||
->andWhere("NOT FIND_IN_SET('or', vision)")
|
||||
->andWhere('status', true)->in('done,closed')
|
||||
->orWhere('closedReason')->eq('done')
|
||||
->markRight(1)
|
||||
@@ -42,6 +43,7 @@ class pv_of_task_in_waterfall extends baseCalc
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.type')->eq('project')
|
||||
->andWhere('t1.model')->eq('waterfall')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ class cv_in_waterfall extends baseCalc
|
||||
->from(TABLE_TASK)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('parent')->ne('-1')
|
||||
->andWhere("NOT FIND_IN_SET('or', vision)")
|
||||
->andWhere('status', true)->in('done,closed')
|
||||
->orWhere('closedReason')->eq('done')
|
||||
->markRight(1)
|
||||
@@ -40,6 +41,7 @@ class cv_in_waterfall extends baseCalc
|
||||
->from(TABLE_EFFORT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution=t2.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t2.project=t3.id')
|
||||
->where("NOT FIND_IN_SET('or', t3.vision)")
|
||||
->groupBy('t3.id')
|
||||
->get();
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ class sv_in_waterfall extends baseCalc
|
||||
->from(TABLE_TASK)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('parent')->ne('-1')
|
||||
->andWhere("NOT FIND_IN_SET('or', vision)")
|
||||
->andWhere('status', true)->in('done,closed')
|
||||
->orWhere('closedReason')->eq('done')
|
||||
->markRight(1)
|
||||
@@ -42,6 +43,7 @@ class sv_in_waterfall extends baseCalc
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.type')->eq('project')
|
||||
->andWhere('t1.model')->eq('waterfall')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ class count_of_user_in_project extends baseCalc
|
||||
->where('t1.type')->eq('execution')
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t3.deleted')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t3.vision)")
|
||||
->groupBy('t3.id')
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ class consume_of_annual_closed_project extends baseCalc
|
||||
->from(TABLE_TASK)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('parent')->ne('-1')
|
||||
->andWhere("NOT FIND_IN_SET('or', vision)")
|
||||
->groupBy('project')
|
||||
->get();
|
||||
|
||||
@@ -42,6 +43,7 @@ class consume_of_annual_closed_project extends baseCalc
|
||||
->andWhere('t1.status')->eq('closed')
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->andWhere('t1.closedDate')->notZeroDatetime()
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ class consume_of_monthly_closed_project extends baseCalc
|
||||
->from(TABLE_TASK)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('parent')->ne('-1')
|
||||
->andWhere("NOT FIND_IN_SET('or', vision)")
|
||||
->groupBy('project')
|
||||
->get();
|
||||
|
||||
@@ -43,6 +44,7 @@ class consume_of_monthly_closed_project extends baseCalc
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->andWhere('t1.closedDate IS NOT NULL')
|
||||
->andWhere('YEAR(t1.closedDate)')->ne('0000')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ class day_of_annual_closed_project extends baseCalc
|
||||
->from(TABLE_TASK)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('parent')->ne('-1')
|
||||
->andWhere("NOT FIND_IN_SET('or', vision)")
|
||||
->groupBy('project')
|
||||
->get();
|
||||
|
||||
@@ -42,6 +43,7 @@ class day_of_annual_closed_project extends baseCalc
|
||||
->andWhere('t1.status')->eq('closed')
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->andWhere('t1.closedDate')->notZeroDatetime()
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* 按全局统计的年度新增Bug数。
|
||||
* 按系统统计的年度新增Bug数。
|
||||
* Count of annual created bug.
|
||||
*
|
||||
* 范围:global
|
||||
* 范围:system
|
||||
* 对象:bug
|
||||
* 目的:scale
|
||||
* 度量名称:按全局统计的年度新增Bug数
|
||||
* 度量名称:按系统统计的年度新增Bug数
|
||||
* 单位:个
|
||||
* 描述:按全局统计的年度新增Bug数是指在一年内新发现的Bug数量。这个度量项反映了系统或项目在一年内出现的新缺陷数量。年度新增Bug数的增加可能意味着质量控制存在问题,需要及时进行处理和改进。
|
||||
* 定义:所有Bug个数求和;创建时间为某年;过滤已删除的Bug;过滤已删除的产品;
|
||||
* 度量库:
|
||||
* 收集方式:realtime
|
||||
* 描述:按系统统计的年度新增Bug数是指在一年内新发现的Bug数量。反映了一个系统或软件每年新增的Bug数量,用于评估评估系统质量、变更管理、资源规划、过程改进和趋势分析等方面。
|
||||
* 定义:所有Bug个数求和。;创建时间为某年。;过滤已删除的Bug。;过滤已删除的产品。;
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @author qixinzhi <qixinzhi@easycorp.ltd>
|
||||
|
||||
@@ -31,6 +31,7 @@ class count_of_invalid_story extends baseCalc
|
||||
->andWhere('t1.type')->eq('story')
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere('t1.closedReason')->in('duplicate,willnotdo,bydesign')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ class count_of_valid_story extends baseCalc
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere('t1.type')->eq('story')
|
||||
->andWhere('t1.closedReason')->notin('duplicate,willnotdo,bydesign,cancel')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ class count_of_reviewing_story_in_user extends baseCalc
|
||||
->where('t2.deleted')->eq('0')
|
||||
->andWhere('t3.deleted')->eq('0')
|
||||
->andWhere('t2.status')->eq('reviewing')
|
||||
->andWhere("NOT FIND_IN_SET('or', t2.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ class dataset
|
||||
->from(TABLE_PROJECT)->alias('t1')
|
||||
->where('type')->eq('program')
|
||||
->andWhere('deleted')->eq('0')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -53,6 +54,7 @@ class dataset
|
||||
->where('type')->eq('program')
|
||||
->andWhere('grade')->eq('1')
|
||||
->andWhere('deleted')->eq('0')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -69,6 +71,7 @@ class dataset
|
||||
return $this->dao->select($fieldList)->from(TABLE_PROJECT)->alias('t1')
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('type')->eq('project')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -88,6 +91,7 @@ class dataset
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t1.type')->in('sprint,stage,kanban')
|
||||
->andWhere('t2.type')->eq('project')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -107,6 +111,7 @@ class dataset
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t3.deleted')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t2.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -183,6 +188,7 @@ class dataset
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t3.deleted')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t3.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -219,6 +225,7 @@ class dataset
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -245,6 +252,7 @@ class dataset
|
||||
->andWhere('t4.deleted')->eq(0) // 已删除的执行
|
||||
->andWhere('t4.type')->in('sprint,stage,kanban')
|
||||
->andWhere('t5.deleted')->eq(0) // 已删除的项目
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -269,6 +277,7 @@ class dataset
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere('t4.deleted')->eq(0)
|
||||
->andWhere('t4.type')->eq('project')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -289,6 +298,7 @@ class dataset
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t1.type')->eq('story')
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -308,6 +318,7 @@ class dataset
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t1.type')->eq('story')
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -326,6 +337,7 @@ class dataset
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->andWhere('t1.stage', true)->eq('released')
|
||||
->orWhere('t1.closedReason')->eq('done')
|
||||
->markRight(1)
|
||||
@@ -348,6 +360,7 @@ class dataset
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t2.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -365,6 +378,7 @@ class dataset
|
||||
->from(TABLE_PRODUCT)->alias('t1')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.shadow')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -384,6 +398,7 @@ class dataset
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t3.deleted')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t1.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -403,6 +418,7 @@ class dataset
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t1.type')->eq('line')
|
||||
->andWhere('t2.type')->eq('program')
|
||||
->andWhere("NOT FIND_IN_SET('or', t2.vision)")
|
||||
->query();
|
||||
}
|
||||
|
||||
|
||||
@@ -398,7 +398,7 @@ class metricZen extends metric
|
||||
$row->scopeID = $record[$scope];
|
||||
}
|
||||
$row->value = is_numeric($record['value']) ? round((float)$record['value'], 2) : $record['value'];
|
||||
if(isset($record['date'])) $row->calcTime = date("Y-m-d H:m", strtotime($record['date']));
|
||||
if(isset($record['date'])) $row->calcTime = date("Y-m-d H:i", strtotime($record['date']));
|
||||
|
||||
$tableData[] = $row;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user