diff --git a/items.go b/items.go index 9e4a2bc..e162969 100644 --- a/items.go +++ b/items.go @@ -550,6 +550,9 @@ func (item *Item) toJSON(config *Config, writeLink bool) string { for _, stageDate := range item.StageDates { data = append(data, stageDate) } + if len(config.Types) > 1 { + data = append(data, strings.TrimSpace(item.Type)) + } for _, value := range item.Attributes { data = append(data, strings.TrimSpace(value)) } diff --git a/jira_to_analytics.go b/jira_to_analytics.go index 645128a..464d8c8 100644 --- a/jira_to_analytics.go +++ b/jira_to_analytics.go @@ -13,7 +13,7 @@ import ( "time" ) -const version = "1.0-beta.12" +const version = "1.0-beta.13" const batchSize = 25 const maxTries = 5 @@ -179,6 +179,9 @@ func writeCSV(items []*Item, config *Config, fileName string) { for _, stage := range config.StageNames { file.WriteString("," + stage) } + if len(config.Types) > 1 { + file.WriteString(",Type") + } for _, attr := range config.Attributes { file.WriteString("," + attr.ColumnName) } @@ -218,6 +221,9 @@ func writeJSON(items []*Item, config *Config, fileName string) { for _, stage := range config.StageNames { file.WriteString(",\"" + stage + "\"") } + if len(config.Types) > 1 { + file.WriteString(",\"Type\"") + } for _, attr := range config.Attributes { file.WriteString(",\"" + attr.ColumnName + "\"") }