public CardView ToCardView() { var cardView = new CardView(); cardView.Id = Id; cardView.Active = Active; cardView.ClassOfServiceId = ClassOfServiceId; cardView.BlockReason = BlockReason; cardView.Description = Description; cardView.StartDate = StartDate; cardView.DueDate = DueDate; cardView.ExternalCardID = ExternalCardID; cardView.ExternalSystemName = ExternalSystemName; cardView.Index = Index; cardView.IsBlocked = IsBlocked; cardView.LaneId = LaneId; cardView.Priority = (PriorityType) Priority; cardView.Size = Size; cardView.Tags = Tags; cardView.Title = Title; cardView.TypeId = TypeId; cardView.Version = Version; //cardView.AssignedUsers = this.AssignedUserIds cardView.Comments = Comments; cardView.HistoryEvents = HistoryEvents; cardView.LastMove = LastMove; cardView.LastActivity = LastActivity; cardView.LastComment = LastComment; cardView.DateArchived = DateArchived; return cardView; }
public Card GetCardByExternalId(string externalId) { if (IsPrefixEnabled && externalId.StartsWith(Prefix)) { externalId = externalId.TrimStart(Prefix.ToCharArray()); } CardView cardView = Lanes.SelectMany(lane => lane.Cards).FirstOrDefault(c => c.ExternalCardID == externalId); if (cardView == null) { cardView = Backlog.SelectMany(lane => lane.Cards).FirstOrDefault(c => c.ExternalCardID == externalId); } if (cardView == null) { cardView = Archive.SelectMany(lane => lane.Cards).FirstOrDefault(c => c.ExternalCardID == externalId); } return(cardView == null ? null : cardView.ToCard()); }
public void UpdateCard(CardView cardToUpdate) { int index = Cards.IndexOf(Cards.FirstOrDefault(x => x.Id == cardToUpdate.Id)); Cards.RemoveAt(index); Cards.Insert(index, cardToUpdate); }
public Card GetCardById(long cardId) { CardView cardView = GetCardViewById(cardId); return(cardView == null ? null : cardView.ToCard()); }
public CardView ToCardView() { var cardView = new CardView(); cardView.Id = Id; cardView.Active = Active; cardView.ClassOfServiceId = ClassOfServiceId; cardView.BlockReason = BlockReason; cardView.Description = Description; cardView.StartDate = StartDate; cardView.DueDate = DueDate; cardView.ExternalCardID = ExternalCardID; cardView.ExternalSystemName = ExternalSystemName; cardView.ExternalCardIdPrefix = ExternalCardIdPrefix; cardView.Index = Index; cardView.IsBlocked = IsBlocked; cardView.LaneId = LaneId; cardView.Priority = (PriorityType)Priority; cardView.Size = Size; cardView.Tags = Tags; cardView.Title = Title; cardView.TypeId = TypeId; cardView.Version = Version; //cardView.AssignedUsers = this.AssignedUserIds cardView.Comments = Comments; cardView.HistoryEvents = HistoryEvents; cardView.LastMove = LastMove; cardView.LastActivity = LastActivity; cardView.LastComment = LastComment; cardView.DateArchived = DateArchived; cardView.ParentBoardId = ParentBoardId; cardView.ParentCardId = ParentCardId; cardView.ActualFinishDate = ActualFinishDate; cardView.ActualStartDate = ActualStartDate; cardView.AssignedUserName = AssignedUserName; cardView.BlockStateChangeDate = BlockStateChangeDate; cardView.BoardId = BoardId; cardView.BoardTitle = BoardTitle; cardView.CardContexts = CardContexts; cardView.CardTypeIconColor = CardTypeIconColor; cardView.CardTypeIconName = CardTypeIconName; cardView.ClassOfServiceCustomIconColor = ClassOfServiceCustomIconColor; cardView.ClassOfServiceCustomIconName = ClassOfServiceCustomIconName; cardView.CreateDate = CreateDate; cardView.CurrentContext = CurrentContext; cardView.CurrentTaskBoardId = CurrentTaskBoardId; cardView.DrillThroughCompletionPercent = DrillThroughCompletionPercent; cardView.DrillThroughProgressTotal = DrillThroughProgressTotal; cardView.DrillThroughProgressComplete = DrillThroughProgressComplete; cardView.DrillThroughProgressSizeComplete = DrillThroughProgressSizeComplete; cardView.DrillThroughProgressSizeTotal = DrillThroughProgressSizeTotal; cardView.GravatarLink = GravatarLink; cardView.Icon = Icon; cardView.IsOlderThanXDays = IsOlderThanXDays; cardView.LaneTitle = LaneTitle; cardView.ParentTaskboardId = ParentTaskboardId; cardView.SmallGravatarLink = SmallGravatarLink; cardView.TaskBoardCompletionPercent = TaskBoardCompletionPercent; cardView.TaskBoardCompletedCardCount = TaskBoardCompletedCardCount; cardView.TaskBoardCompletedCardSize = TaskBoardCompletedCardSize; cardView.TaskBoardTotalCards = TaskBoardTotalCards; cardView.TaskBoardTotalSize = TaskBoardTotalSize; return(cardView); }
public CardView ToCardView() { var cardView = new CardView(); cardView.Id = Id; cardView.Active = Active; cardView.ClassOfServiceId = ClassOfServiceId; cardView.BlockReason = BlockReason; cardView.Description = Description; cardView.StartDate = StartDate; cardView.DueDate = DueDate; cardView.ExternalCardID = ExternalCardID; cardView.ExternalSystemName = ExternalSystemName; cardView.ExternalCardIdPrefix = ExternalCardIdPrefix; cardView.Index = Index; cardView.IsBlocked = IsBlocked; cardView.LaneId = LaneId; cardView.Priority = (PriorityType) Priority; cardView.Size = Size; cardView.Tags = Tags; cardView.Title = Title; cardView.TypeId = TypeId; cardView.Version = Version; //cardView.AssignedUsers = this.AssignedUserIds cardView.Comments = Comments; cardView.HistoryEvents = HistoryEvents; cardView.LastMove = LastMove; cardView.LastActivity = LastActivity; cardView.LastComment = LastComment; cardView.DateArchived = DateArchived; cardView.ParentBoardId = ParentBoardId; cardView.ParentCardId = ParentCardId; cardView.ActualFinishDate = ActualFinishDate; cardView.ActualStartDate = ActualStartDate; cardView.AssignedUserName = AssignedUserName; cardView.BlockStateChangeDate = BlockStateChangeDate; cardView.BoardId = BoardId; cardView.BoardTitle = BoardTitle; cardView.CardContexts = CardContexts; cardView.CardTypeIconColor = CardTypeIconColor; cardView.CardTypeIconName = CardTypeIconName; cardView.ClassOfServiceCustomIconColor = ClassOfServiceCustomIconColor; cardView.ClassOfServiceCustomIconName = ClassOfServiceCustomIconName; cardView.CreateDate = CreateDate; cardView.CurrentContext = CurrentContext; cardView.CurrentTaskBoardId = CurrentTaskBoardId; cardView.DrillThroughCompletionPercent = DrillThroughCompletionPercent; cardView.DrillThroughProgressTotal = DrillThroughProgressTotal; cardView.DrillThroughProgressComplete = DrillThroughProgressComplete; cardView.DrillThroughProgressSizeComplete = DrillThroughProgressSizeComplete; cardView.DrillThroughProgressSizeTotal = DrillThroughProgressSizeTotal; cardView.GravatarLink = GravatarLink; cardView.Icon = Icon; cardView.IsOlderThanXDays = IsOlderThanXDays; cardView.LaneTitle = LaneTitle; cardView.ParentTaskboardId = ParentTaskboardId; cardView.SmallGravatarLink = SmallGravatarLink; cardView.TaskBoardCompletionPercent = TaskBoardCompletionPercent; cardView.TaskBoardCompletedCardCount = TaskBoardCompletedCardCount; cardView.TaskBoardCompletedCardSize = TaskBoardCompletedCardSize; cardView.TaskBoardTotalCards = TaskBoardTotalCards; cardView.TaskBoardTotalSize = TaskBoardTotalSize; return cardView; }