Пример #1
0
        public string ToCSV(int maxLabels, int maxAffVer, int maxComponent, int maxFixVer, int maxComment, int maxAttachment)
        {
            StringBuilder str = new StringBuilder();
            str.Append($"{DestinationIssueKey};");
            str.Append($"{DestinationParentIssueKey};");
            str.Append($"\"{IssueType}\";");
            str.Append($"\"{Reporter}\";");
            str.Append($"\"{FormatDate(DateCreated)}\";");
            str.Append($"\"{(string.IsNullOrEmpty(Summary) ? string.Empty : Summary.Replace('\"', '\''))}\";");
            str.Append(AppendString(Labels, maxLabels));
            str.Append($"\"{Assignee}\";");
            //str.Append(string.Format("\"{0}\";", Descripton.Replace("\r\n", "$")));
            str.Append($"\"{(string.IsNullOrEmpty(Descripton) ? string.Empty : Descripton.Replace('\"', '\''))}\";");
            //str.Append(string.Format("\"{0}\";", AcceptanceCriteria));
            str.Append($"\"{(string.IsNullOrEmpty(ChangeLog) ? string.Empty : ChangeLog.Replace('\"', '\''))}\";");
            str.Append($"\"{CostUnit}\";");
            str.Append($"\"{Priority}\";");
            str.Append($"\"{EpicName}\";");
            str.Append($"\"{EpicLink}\";");
            str.Append(AppendString(AffectVersion, maxAffVer));
            //str.Append(string.Format("\"{0}\";", Attachments+";");
            str.Append(AppendString(Components, maxComponent));
            str.Append(AppendString(FixVersion, maxFixVer));
            str.Append($"\"{Status}\";");
            str.Append($"\"{Resolution}\";");
            str.Append(AppendComments(CommentsBody, maxComment));
            str.Append(AppendAttachment(Attachments, maxAttachment));
            return str.ToString();

        }