private void ExportAsTextResults() { var resultBuilder = new StringBuilder(); var grouped = Issues.OfType <JiraIssue>().GroupBy(i => i.EpicName); foreach (var group in grouped) { if (string.IsNullOrWhiteSpace(group.Key)) { resultBuilder.AppendLine("\n(No Epic)"); } else { resultBuilder.AppendLine("\n" + group.Key); } foreach (var issue in group) { resultBuilder.AppendLine(string.Format("* {0} - {1}", issue.Key, issue.Summary)); } } var dialog = new TextualPreview(resultBuilder.ToString()); dialog.ShowDialog(); }
private void ExportAsConfluenceMarkupResults() { var resultBuilder = new StringBuilder(); var grouped = Issues.OfType <JiraIssue>().GroupBy(i => i.EpicName); foreach (var group in grouped) { resultBuilder.AppendLine(); if (string.IsNullOrWhiteSpace(group.Key)) { resultBuilder.AppendLine("h2. (No Epic)"); } else { resultBuilder.AppendLine("h2. " + group.Key); } resultBuilder.AppendLine(); foreach (var issue in group) { resultBuilder.AppendLine(string.Format("* *{0}* - {1}", issue.Key, EscapeConfluenceMarkupCharacters(issue.Summary))); } } var dialog = new TextualPreview(resultBuilder.ToString()); dialog.ShowDialog(); }