private void CreateComment(int?tpBugId, BugzillaComment bugzillaComment) { if (string.IsNullOrEmpty(bugzillaComment.Body)) { return; } var userId = ObjectFactory.GetInstance <IUserMapper>().GetTpIdBy(bugzillaComment.Author); var comment = new CommentDTO { Description = DescriptionConverter.FormatDescription(bugzillaComment.Body), GeneralID = tpBugId, CreateDate = CreateDateConverter.ParseFromBugzillaLocalTime(bugzillaComment.DateAdded), OwnerID = userId }; Send(new CreateCommentCommand(comment)); Data.CommentsToCreateCount++; }
private bool CommentExists(ExistingBugImportedToTargetProcessMessage <BugzillaBug> message, BugzillaComment comment) { return(StorageRepository().Get <CommentDTO>(message.TpBugId.ToString()) .Any(c => c.CreateDate.Value.ToUniversalTime() == CreateDateConverter.ParseToUniversalTime(comment.DateAdded))); }