从JIRA提取周期时间分析数据
项目描述
此实用程序帮助从JIRA提取数据,用于与ActionableAgile™分析工具(https://www.actionableagile.com/analytics-tools/)进行处理,以及使用Excel进行临时分析。
它将生成一个CSV文件,其中每行对应一个与一组筛选标准匹配的JIRA问题,包含关于问题的基本信息以及问题进入主工作流程每个步骤的日期。
这些数据可用于生成累积流量图、周期时间散点图、周期时间直方图和其他基于周期时间的分析。
安装
安装Python 2.7和pip。请参阅http://pip.readthedocs.org/en/stable/installing/。
使用pip安装
$ pip install actionable-agile-extract
如果遇到错误,请先分别安装numpy和pandas
$ pip install numpy pandas $ pip install actionable-agile-extract
配置
编写一个YAML配置文件,例如命名为config.yaml
# How to connect to JIRA? Connection: Domain: https://myserver.atlassian.net Username: myusername # If missing, you will be prompted at runtime Password: secret # If missing, you will be prompted at runtime # What to search for? Criteria: Project: ABC # JIRA project key to search Issue types: # Which issue types to include - Story - Defect Valid resolutions: # Which resolution statuses to include (unresolved is always included) - Done - Closed JQL: labels != "Spike" # Additional filter as raw JQL, optional # Describe the workflow. Each step can be mapped to either a single JIRA # status, or a list of statuses that will be treated as equivalent Workflow: Open: Open Analysis IP: Analysis in Progress Analysis Done: Analysis Done Development IP: Development in Progress Development Done: Development Done Test IP: Test in Progress Test Done: Test Done Done: - Closed - Done # Map field names to additional attributes to extract Attributes: Components: Component/s Priority: Priority Release: Fix version/s
连接、标准和工作流程部分是必需的。
在连接下,仅需要域。如果没有指定,则运行脚本时会提示用户输入用户名和密码。
在标准下,所有字段在技术上都是可选的,但您应该指定其中的一些,以避免无限制的查询。
在工作流程下,至少需要两个步骤。按顺序指定步骤。您可以指定单个工作流程值或列表(如上所示为完成),在这种情况下,多个JIRA状态将合并为单个状态,用于分析目的。
文件和类似工作流程状态和属性之类的值的大小写不敏感。
在指定属性时,请使用字段在JIRA屏幕上的名称(而不是其id,正如您可能在JQL中做的那样),例如使用组件/s而不是components。
属性类型(问题类型)、状态和解决总是包含在内。
指定组件/s或修复版本/s等可能具有值列表的字段时,仅使用第一个值集。
运行
使用以下命令运行二进制文件
$ jira-cycle-extract config.yaml data.csv
这将根据config.yaml中的配置提取名为data.csv的CSV文件,其中包含周期数据。
使用-v选项在提取过程中打印更多信息。