经过仔细比对,发现禅道的bug查询有些不靠谱(后来发现是运维失误导致的,docker镜像数据库和分析库没同步导致的。。。。),自己动手丰衣足食,呵呵
用下面这个SQL,你就可以构建一个简单的分析模型了
/*create by lky*/
SELECT
(select name from zt_product where id=zt_bug.product) as 产品id,
m2.`name` as 模块名称,
m1.`name` as 子模块名称,
zt_bug.id as bug编号,
zt_bug.title as bug标题,
zt_bug.assignedTo 指派给_id,
zt_bug.type as 类型,
zt_bug.`status` as 状态,
zt_bug.openedBy as 提交人,
date_format(zt_bug.openedDate,'%Y-%m-%d') as 激活时间,
zt_bug.resolvedBy as 解决人,
date_format(zt_bug.assignedDate,'%Y-%m-%d')as 指派时间,
date_format(zt_bug.resolvedDate,'%Y-%m-%d')as 解决时间,
zt_bug.closedBy as 关闭人,
date_format(zt_bug.closedDate,'%Y-%m-%d') as 关闭时间,
case `status` when 'active' then TIMESTAMPDIFF(Day,zt_bug.openedDate,NOW()) else TIMESTAMPDIFF(Day,zt_bug.openedDate,zt_bug.resolvedDate) end as 解决耗时,
case `status` when 'closed' then TIMESTAMPDIFF(Day,zt_bug.openedDate,zt_bug.closedDate) ELSE TIMESTAMPDIFF(Day,zt_bug.openedDate,now()) end as 总耗时
FROM
zt_bug ,
zt_module AS m1 ,
zt_module AS m2
WHERE
zt_bug.module = m1.id AND
m1.path LIKE concat('%,',m2.id,',%') AND
m2.grade = 1
and zt_bug.deleted='0'
然后就可以用各种姿势让数据来说话了
不喜欢看柱子的,咱们换饼子
看看谁提交的bug最多
然后把这一系列图表做成可穿透可联动的看板
接下来的按照时间的趋势图,围绕计划任务的项目燃尽图、挣值分析等等,就看我们质量和开发管理部门的伙伴们的了