基于禅道数据库对bug进行不同维度统计
工作中经常需要在周报、月报、年报对禅道bug数据进行不同维度统计导出,以下是我常用的统计sql
1、统计2022年每个月bug数(deleted='0'是查询未删除的bug)
select DATE_FORMAT(a.openedDate,'%Y-%m') as '月份',count(DATE_FORMAT(a.openedDate,'%Y-%m')) 'bug数量' from zt_bug a
where a.deleted='0' and a.openedDate>'2022-01-01' and a.openedDate<'2023-01-01' GROUP BY DATE_FORMAT(a.openedDate,'%Y-%m')

2、统计2022年测试人员每个月创建bug数量
select c.realname '创建人', DATE_FORMAT(a.openedDate,'%Y-%m') as '月份',count(c.realname) 'bug数量' from zt_bug a
left join zt_user c on a.openedBy=c.account
where a.deleted='0' and a.openedDate>'2022-01-01' and a.openedDate<'2023-01-01' GROUP BY c.realname,DATE_FORMAT(a.openedDate,'%Y-%m')

3、统计2022年开发人员每个月被指派bug数量(有效bug排除5个resolution解决方案:external外部原因,bydesign设计如此,willnotfix不予解决,notrepro无法重现,duplicate重复bug)
select IF(a.resolution !='',f.realname,e.realname) '解决人',DATE_FORMAT(a.openedDate,'%Y-%m') as '月份',count(1) 'bug数量' from zt_bug a
left join zt_user f on a.resolvedBy=f.account
left join zt_user e on a.assignedTo=e.account
where a.deleted='0' and a.openedDate>'2022-01-01' and a.openedDate<'2023-02-16' and a.resolution not in ('external','bydesign','willnotfix','notrepro','duplicate')
GROUP BY IF(a.resolution !='',f.realname,e.realname),DATE_FORMAT(a.openedDate,'%Y-%m')

4、统计某段时间内的bug详细数据,将代码转化为中文、将用户名转化成中文
select a.id 'BugID',b.name '产品',
case a.type when 'designdefect' then '设计缺陷' when 'codeerror' then '代码错误' when 'standard' then '标准规范' when 'others' then '其它' when 'config' then '配置相关'
when 'interface' then '界面优化' when 'install' then '安装部署' end 'Bug类型',
a.title 'Bug标题',a.severity '级别',a.pri '优先级',
case a.status when 'closed' then '已关闭' when 'resolved' then '已解决' when 'active' then '激活' end '状态',
c.realname '创建人',a.openedDate'创建时间',i.name '项目',d.name '版本',e.realname '指派人',g.name '组别',f.realname '解决人',h.name '组别(已解决)',a.activatedCount '激活次数',a.resolvedDate '解决时间',
case a.resolution when 'fixed' then '已解决' when 'external' then '外部原因' when 'bydesign' then '设计如此' when 'willnotfix' then '不予解决' when 'notrepro' then '无法重现'
when 'postponed' then '延期处理' when 'duplicate' then '重复bug' end as '解决方案' from zt_bug a
left join zt_product b on b.id=a.product
left join zt_user c on a.openedBy=c.account
left join zt_user f on a.resolvedBy=f.account
left join zt_user e on a.assignedTo=e.account
left join zt_build d on d.id=a.openedBuild
left join zt_dept h on f.dept=h.id
left join zt_dept g on e.dept=g.id
left join zt_project i on d.project=i.id
-- where DATE_SUB(CURDATE(),INTERVAL 6 DAY) <= date(a.openedDate) and a.deleted='0'
where a.deleted='0' and a.openedDate>'2023-01-01' and a.openedDate<'2023-02-01'

5、统计某段时间内各项目bug情况:产品+项目名+版本名+数量
select b.name '产品',i.name '项目',d.name '版本',count(d.name) as "bug总数量" from zt_bug a
left join zt_product b on b.id=a.product
left join zt_build d on d.id=a.openedBuild
left join zt_project i on d.project=i.id
where a.openedDate>'2022-10-01' and a.openedDate<'2022-11-01' and a.deleted='0' and d.name is not null
group by b.name,i.name,d.name ORDER BY count(d.name) desc

基于禅道数据库对bug进行不同维度统计的更多相关文章
- windows系统搭建禅道系统(BUG管理工具)
我也呆过三家公司了,用过的BUG管理工具也是五花八门的,常见的一般有禅道,bugzilla,jira等 个人比较推荐禅道,功能强大,主页的说明文档也是相当详细,最主要的是,用的人比较多,出现使用问题一 ...
- 使用钉钉对接禅道的bug系统,实现禅道提的bug实时在钉钉提醒并艾特对应的开发人员处理
现在公司测试中有一个痛点是每次测试人员提完bug后,需要定期去提醒开发人员查看禅道的bug记录及修复bug. 导致测试人员在项目测试中不仅要测试整个软件,还要负起实时监督提醒功能的“保姆角色”,身心疲 ...
- python数据统计之禅道bug统计
背景 通过定期输出 每条产品的 BUG 情况,以此来反馈开发解决问题.测试跟进问题的情况:钉钉群推送提醒开发及时解决 以此我这边开始着手准备编写一个小工具,最终达到目的:自动定期发送统计报告,报告维度 ...
- python tornado 实现类禅道系统
最近楼主加班 喽, 好久没有更新我的博客了,哎,一言难尽,废话我就不说了,来开始上精华. 背景:目前市面上有很多bug管理工具,但是各有各的特点,最著名,最流行的就是禅道,一个偶然的机会接触到了pyt ...
- 如何在Linux服务器上部署禅道
最近换了新的项目团队,由于新团队比较年轻化,没有实行正规的项目管理,于是我自告奋勇要为团队管理出一份力,帮助团队建立敏捷化的项目管理,经过多方考究和对比后,选择了目前较受欢迎的开源项目管理软件:禅道. ...
- Docker搭建Zentao(禅道)
禅道搭建方式有很多种,可参考官方文档搭建,这里介绍的是参考官方文档以docker方式搭建. 禅道内部默认会自动安装mysql数据库. 一.下载地址 禅道开源版: http://dl.cnezsof ...
- 禅道导入bugfree 3.0的数据
禅道项目导入bugfree功能只支持到2.0, 官方不提供3.0的导入,只好自己写了一个.因为bugfree 3.0换人开发了,表结构和禅道差别很大,所以,这个工具不是完全转换,一些History表内 ...
- 禅道docker化(Centos7.2)
操作步骤 确认服务器禅道版本及容器禅道版本 服务器禅道版本:9.6.2 容器禅道版本:9.6.3 版本sql比对 下载官方9.6.3源码包url:http://dl.cnezsoft.com/zent ...
- 禅道迁移(windows_to_linux)
需求分析 随着禅道数据的增加,原来通过虚拟机提供的mysql服务器相应速度跟不上需求.且原来禅道的前端与数据库分离安装在windows与linux中,现在提供实体服务器,需要将禅道环境迁移. 确认环境 ...
- Linux部署禅道Steps&Q&A
1.查看Linux的位数: getconf LONG_BIT 结果:32/64 2. 禅道开源版安装包下载 Linux 64位 下载站点1: http://sourceforge.net/projec ...
随机推荐
- 在 Excel 中使用 Python 自动填充公式
安转Python包的国内镜像源 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple 阿里云 https://mirrors.aliyun.com/pypi/si ...
- memo(自带)
React.memo()是一个高阶函数,它与 React.PureComponent类似,但是一个函数组件而非一个类.如果你的组件在相同 props的情况下渲染相同的结果,那么你可以通过将其包装在 R ...
- Java访问权限修饰符(public , private , protected)
访问权限修饰符包括:public.protected.private和默认修饰符(friendly/包访问权限). 可以修饰在类.字段.方法前面. public:公开权限,所有类都可以访问. prot ...
- Prometheus 14 点实践经验分享
这是 2017 年的 promcon 的分享,原文地址在这里,作者 Julius Volz,今天偶然看到,虽然已经过去 6 年,有些实践经验还是非常值得学习.做个意译,加入一些自己的理解,分享给大家. ...
- npm 发布自己组件包
npm 发布自己组件包 发布到 npm 上 首先创建自己的npm账号 npm init npm install npm uninstall npm config edit // 编辑 npm conf ...
- 海量数据处理利器 Roaring BitMap 原理介绍
作者:来自 vivo 互联网服务器团队- Zheng Rui 本文结合个人理解梳理了BitMap及Roaring BitMap的原理及使用,分别主要介绍了Roaring BitMap的存储方式及三种c ...
- Spring之WebMvcConfigurationSupport
WebMvcConfigurationSupport是mvc的核心配置.开发spring,了解和掌握这个是必须的. 为了简约篇幅,本文把"WebMvcConfigurationSupport ...
- 初识 SpringMVC,运行配置第一个Spring MVC 程序
1. 初识 SpringMVC,运行配置第一个Spring MVC 程序 @ 目录 1. 初识 SpringMVC,运行配置第一个Spring MVC 程序 1.1 什么是 MVC 2. Spring ...
- Linux设备模型:4、sysfs
作者:wowo 发布于:2014-3-14 18:31 分类:统一设备模型 http://www.wowotech.net/device_model/dm_sysfs.html 前言 sysfs是一个 ...
- k8s学习总结之各组件功能及作用的详细介绍
K8S集群架构: 一个K8S集群是由两大部分组成: Master节点和Node节点 一.Master节点主要包括API Server.Scheduler.Controller manager.etcd ...