方便你写周报、写总结、出报告
描述 | 描述 |
---|---|
zt_case | 测试用例表 |
zt_bug | 测试 bug 表 |
zt_project | 项目表 |
zt_action | 流程动作表 (解决、关闭、激活...) |
zt_user | 用户表 |
测试人员发现有效 bug 数排行。条件:时间
SELECT COUNT(*) num, openedBy, realname FROM zt_bug b INNER JOIN zt_user u ON u.account = b.openedBy WHERE DATE_FORMAT(b.openedDate, '%Y%m') = '202003' AND b.resolution NOT IN ( 'bydesign', 'duplicate', 'external', 'notrepro', 'willnotfix' ) GROUP BY b.openedBy ORDER BY num DESC;
研发人员发生 bug 数排行。条件:时间
SELECT COUNT(*) num, openedBy, realname FROM zt_bug b INNER JOIN zt_user u ON u.account = b.resolvedBy WHERE DATE_FORMAT(b.openedDate, '%Y%m') = '202304' GROUP BY b.resolvedBy ORDER BY num DESC;
研发 Bug 被激活次数 (非一次性通过)。 条件:时间
SELECT SUM(num) num, realname FROM ( SELECT b.id, COUNT(1) num, u.realname realname FROM zt_bug b INNER JOIN zt_action a ON a.objectID = b.id INNER JOIN zt_user u ON u.account = b.resolvedBy WHERE DATE_FORMAT(b.openedDate, '%Y%m') = '201204' AND a.objectType = 'bug' AND a.action = 'activated' GROUP BY b.id ORDER BY num DESC ) tem GROUP BY tem.realname ORDER BY num DESC;
表名 | 描述 |
---|---|
project | 项目表 |
jiraissue | 问题表 |
issuestatus | 问题状态表 |
issuelink | 问题链接表 |
worklog | 工作日志表 |
customfieldvalue | 问题属性值表 |
app_user | 用户表 |
fileattachment | 附件表 |
统计某时间段内每个人在每个项目中的工作量
SELECT p.pname, u.lower_user_name username, sum(l.timeworked / 28800) all_time FROM jiraissue ji INNER JOIN project p ON ji.PROJECT = p.ID INNER JOIN worklog l ON ji.id = l.issueid INNER JOIN app_user u ON l.UPDATEAUTHOR = u.user_key WHERE l.startdate BETWEEN '2020-03-01' AND '2020-03-31 23:59:59' GROUP BY l.UPDATEAUTHOR, p.id
如果统计 bug 问题数,已 jiraissue 展开 sql 编写即可
扫一扫,关注我