Ejemplo n.º 1
0
        internal string GetChangeComment(ChangeGroup group)
        {
            string migrationComment = m_commentDecorationService.GetChangeGroupCommentSuffix(group.Name);

            // ToDo, embed conflict resolution into comment

            /*
             * string resolutionDesc = string.Empty;
             * StringBuilder resolutionDescSB = new StringBuilder();
             * resolutionDescSB.Append("Applied conflict resolution rules: ");
             * string resolutionDescFormat = "{0}; ";
             * List<ConflictResolutionRule> rulesAppliedOnGroup;
             * if (m_conflictManagementService.TryGetResolutionRulesAppliedToGroup(group, out rulesAppliedOnGroup))
             * {
             *  foreach (ConflictResolutionRule rule in rulesAppliedOnGroup)
             *  {
             *      resolutionDescSB.AppendFormat(resolutionDescFormat, rule.RuleReferenceName);
             *  }
             *  resolutionDesc = resolutionDescSB.ToString();
             * }
             * migrationComment = m_commentDecorationService.AddToChangeGroupCommentSuffix(migrationComment, resolutionDesc);
             * */

            return(group.Comment + " " + migrationComment);
        }
        private void PrintUpdateLogHeader(IMigrationAction action, StringBuilder updateLog)
        {
            string author         = UtilityMethods.ExtractAuthor(action);
            string changedDate    = UtilityMethods.ExtractChangeDate(action);
            string srcWorkItemId  = UtilityMethods.ExtractSourceWorkItemId(action);
            string srcWorkItemRev = UtilityMethods.ExtractSourceWorkItemRevision(action);

            updateLog.Append(m_commentDecorationService.GetChangeGroupCommentSuffix(srcWorkItemId));
            string revDecoration = String.Format(ClearQuestResource.ClearQuest_Msg_UpdateLogRevFormat, srcWorkItemRev);

            updateLog.Append(m_commentDecorationService.AddToChangeGroupCommentSuffix(string.Empty, revDecoration));
            string updateLogDetailsHeader = String.Format(ClearQuestResource.ClearQuest_Msg_UpdateLogHeaderFormat, author, changedDate);

            updateLog.Append(m_commentDecorationService.AddToChangeGroupCommentSuffix(string.Empty, updateLogDetailsHeader));
        }