* Fix metric calculate definition.
This commit is contained in:
@@ -34,7 +34,6 @@ class count_of_assigned_bug_in_user extends baseCalc
|
||||
|
||||
if(!isset($this->result[$assignedTo])) $this->result[$assignedTo] = 0;
|
||||
$this->result[$assignedTo] += 1;
|
||||
|
||||
}
|
||||
|
||||
public function getResult($options = array())
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* 度量名称:按人员统计的待处理用例数
|
||||
* 单位:个
|
||||
* 描述:按人员统计的待处理用例数表示每个人待处理的用例数量之和。反映了每个人需要处理的用例数量上的规模。该数值越大,说明需要投入越多的时间处理用例。
|
||||
* 定义:所有用例个数求和;指派给为某人;测试单的状态不为已完成;过滤已删除的用例;过滤已删除测试单的用例;过滤已删除产品的用例;
|
||||
* 定义:按人员统计的待处理的用例个数;所有测试单中的用例个数求和(不去重);指派给某人;过滤已删除的用例;过滤已删除的测试单中的用例;过滤已关闭的测试单中的用例;
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @author zhouxin <zhouxin@easycorp.ltd>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* 度量名称:按人员统计的待处理任务数
|
||||
* 单位:个
|
||||
* 描述:按人员统计的待处理任务数表示每个人待处理的任务数量之和。反映了每个人在需要处理的任务数量上的规模。该数值越大,说明需要投入越多的时间处理任务。
|
||||
* 定义:任务个数求和;指派给为某人,并且过滤任务状态为已关闭和已取消的任务;如果任务为多人任务,并且过滤状态为已完成的任务;过滤已删除的任务;过滤已删除项目的任务;过滤已删除执行的任务;过滤挂起的执行和项目;
|
||||
* 定义:所有任务个数求和;指派给为某人;过滤已关闭的任务;过滤已取消的任务;过滤已删除的任务;过滤已删除项目的任务;过滤已删除执行的任务;过滤多人任务中某人任务状态为已完成的任务;过滤任务关联的执行和项目都为挂起状态时的任务
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @author qixinzhi <qixinzhi@easycorp.ltd>
|
||||
@@ -22,7 +22,7 @@ class count_of_assigned_task_in_user extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.assignedTo', 't1.status', 't1.mode', 't4.account', 't3.status as projectStatus', 't2.status as executionStatus');
|
||||
public $fieldList = array('t1.assignedTo', 't1.status', 't1.mode', 't4.account', 't3.status as projectStatus', 't2.status as executionStatus', 't4.status as teamStatus');
|
||||
|
||||
public $result = array();
|
||||
|
||||
@@ -34,17 +34,19 @@ class count_of_assigned_task_in_user extends baseCalc
|
||||
|
||||
$projectStatus = $row->projectStatus;
|
||||
$executionStatus = $row->executionStatus;
|
||||
$teamStatus = $row->teamStatus;
|
||||
|
||||
if(empty($assignedTo) || $assignedTo == 'closed') return false;
|
||||
if($status == 'closed' || $status == 'cancel') return false;
|
||||
if($projectStatus == 'suspended' || $projectStatus == 'closed' || $executionStatus == 'suspended' || $executionStatus == 'closed') return false;
|
||||
|
||||
if($mode == 'multi')
|
||||
{
|
||||
if($status == 'done') return false;
|
||||
if($teamStatus == 'done') return false;
|
||||
$assignedTo = $row->account;
|
||||
}
|
||||
|
||||
/* 如果执行和项目都是挂起的,不计算。*/
|
||||
if($projectStatus == 'suspended' && $executionStatus == 'suspended') return false;
|
||||
|
||||
|
||||
if(!isset($this->result[$assignedTo])) $this->result[$assignedTo] = 0;
|
||||
$this->result[$assignedTo] += 1;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* 度量名称:按人员统计的待处理研发需求数
|
||||
* 单位:个
|
||||
* 描述:按人员统计的待处理研发需求数表示每个人待处理的研发需求数量之和。反映了每个人员需要处理的研发需求数量的规模。该数值越大,说明需要投入越多的时间处理研发需求。
|
||||
* 定义:所有研发需求个数求和;指派给为某人;过滤已删除的研发需求;过滤已删除产品的研发需求;
|
||||
* 定义:所有研发需求个数求和;过滤已删除的研发需求;过滤状态为已关闭的研发需求;过滤已删除产品下的研发需求;过滤已删除的无产品项目下的研发需求。
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @author qixinzhi <qixinzhi@easycorp.ltd>
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
class count_of_pending_story_in_user extends baseCalc
|
||||
{
|
||||
public $dataset = 'getDevStories';
|
||||
public $dataset = 'getAllDevStories';
|
||||
|
||||
public $fieldList = array('assignedTo');
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* 度量名称:按人员统计的待评审研发需求数
|
||||
* 单位:个
|
||||
* 描述:按人员统计的待评审研发需求数表示每个人需要评审的研发需求数量之和。反映了每个人需要评审的研发需求的规模。该数值越大,说明需要投入越多的时间评审需求。
|
||||
* 定义:所有研发需求个数求和;状态为评审中;指派给为某人;过滤已删除的研发需求;过滤已删除产品的研发需求;
|
||||
* 定义:所有研发需求个数求和;评审人为某人;评审结果为空;评审状态为评审中或变更中;过滤已删除的需求;过滤已删除产品的需求;
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @author qixinzhi <qixinzhi@easycorp.ltd>
|
||||
@@ -24,14 +24,15 @@ class count_of_reviewing_story_in_user extends baseCalc
|
||||
|
||||
public function getStatement()
|
||||
{
|
||||
return $this->dao->select('t1.reviewer, t1.story, t1.version')
|
||||
->from(TABLE_STORYREVIEW)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t2.product=t3.id')
|
||||
->where('t2.deleted')->eq('0')
|
||||
->andWhere('t2.type')->eq('story')
|
||||
->andWhere('t3.deleted')->eq('0')
|
||||
->andWhere('t2.status')->eq('reviewing')
|
||||
return $this->dao->select('t3.reviewer, t3.story, t3.version')
|
||||
->from(TABLE_STORY)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
|
||||
->leftJoin(TABLE_STORYREVIEW)->alias('t3')->on('t1.id=t3.story and t1.version=t3.version')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->andWhere('t1.type')->eq('story')
|
||||
->andWhere('t1.status')->in('reviewing,changing')
|
||||
->andWhere('t3.result')->eq('')
|
||||
->andWhere("t2.vision NOT LIKE '%or%'")
|
||||
->andWhere("t2.vision NOT LIKE '%lite%'")
|
||||
->query();
|
||||
|
||||
Reference in New Issue
Block a user