使用JIRA之后,所有开发的系统的BUG及功能开发都在上面流程记录,当我们想对这些海量数据进行统计分析时,如统计各个系统的问题数量,各测试人员每周每月所提交的问题数量,开发人员每月处理的BUG数量等等,甚至可以通过这些数据进行绩效考核。那么,可以通过了解JIRA的数据库mysql表结构,用SQL脚本导出数据进行专门分析。参考脚本
SELECT
pj.pname AS '项目名称',
CONCAT(
pk.PROJECT_KEY,
'-',
ji.issuenum
)AS '问题标号',
ji.SUMMARY AS '问题主题',
cg.AUTHOR AS '经办人',
cu.display_name AS '经办人姓名',
ci.FIELD AS '步骤状态值',
ci.OLDVALUE AS '原状态值',
ci.OLDSTRING AS '原状态名',
ci.NEWVALUE AS '新状态值',
ci.NEWSTRING AS '新状态名',
cg.CREATED AS '处理时间'
FROM
changeitem ci
LEFT JOIN changegroup cg ON ci.groupid = cg.ID
LEFT JOIN jiraissue ji ON ji.ID = cg.issueid
LEFT JOIN project pj ON pj.ID = ji.PROJECT
LEFT JOIN project_key pk ON pj.ID = pk.PROJECT_ID
LEFT JOIN cwd_user cu ON cu.user_name = cg.AUTHOR
WHERE
ci.FIELD IN('status')
ORDER BY
pj.ID,
cg.issueid desc,
cg.CREATED desc