module CSVData
This module supports parsing an export of Jira data to build a sample of historic throughputs that provide a more accurate forecast It takes the absolute path to the csv export and returns an array containing the number of tasks/tickets completed each week
Constants
- RESOLVED
Public Instance Methods
historic_throughput(path)
click to toggle source
# File lib/monte/csv_data.rb, line 12 def historic_throughput(path) headers, *data = CSV.read(path) resolved_column = headers.index(RESOLVED) resolved_dates = data.flat_map { |row| Date.parse row[resolved_column] } grouped_into_weeks = resolved_dates.group_by { |date| date - date.wday } grouped_into_weeks.values.map(&:length) end